Set SO_BINDTODEVICE on DHCP sockets when doing DHCP on one interface

only. Fixes OpenSTack use-case.
This commit is contained in:
Simon Kelley
2012-04-16 14:41:56 +01:00
parent 1023dcbc9e
commit 9380ba70d6
5 changed files with 70 additions and 2 deletions

View File

@@ -388,7 +388,7 @@ struct server {
struct irec {
union mysockaddr addr;
struct in_addr netmask; /* only valid for IPv4 */
int tftp_ok, mtu, done, dad;
int tftp_ok, dhcp_ok, mtu, done, dad;
char *name;
struct irec *next;
};
@@ -1108,6 +1108,9 @@ u16 lookup_dhcp_opt(int prot, char *name);
u16 lookup_dhcp_len(int prot, u16 val);
char *option_string(int prot, unsigned int opt, unsigned char *val,
int opt_len, char *buf, int buf_len);
#ifdef HAVE_LINUX_NETWORK
void bindtodevice(int fd);
#endif
# ifdef HAVE_DHCP6
void display_opts6(void);
void join_multicast(void);