On Jan 16, 4:44*am, Christophe Lohr <christophe.l...@enst-bretagne.fr>
wrote:
> char * device = "eth0:1";
> int s;
> s = socket(PF_INET, SOCK_STREAM, 0);
> if (setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device)))
> * * perror("setsockopt");
> the result is:
> * setsockopt: No such device
> Why?
> SO_BINDTODEVICE is not supposed to work on an aliased interface?
Just bind to the main interface. The aliased interface is an alias for
the main interface, that is, it's another name for the same interface.
DS
|