diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-27 00:20:22 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-27 00:20:22 +0100 |
commit | a98fbf0f12b5e83e25afa0f585ca6a4d4ac5f6bf (patch) | |
tree | f6c215cd05ec9278696fae7b8814b5071a4b3c6a /sysdep/linux | |
parent | a3b70dc499b64f41aa776b5b4afee5c7bfb8dfa6 (diff) | |
parent | 1567edea8d3da7da08092eef15bb3bd4544c6464 (diff) | |
download | bird-a98fbf0f12b5e83e25afa0f585ca6a4d4ac5f6bf.tar bird-a98fbf0f12b5e83e25afa0f585ca6a4d4ac5f6bf.zip |
Merge branch 'dev' into out
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/netlink/netlink.c | 9 | ||||
-rw-r--r-- | sysdep/linux/sysio.h | 21 |
2 files changed, 25 insertions, 5 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index 4784195..38d00af 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -499,6 +499,8 @@ nl_send_route(struct krt_proto *p, rte *e, int new) nl_add_attr_ipa(&r.h, sizeof(r), RTA_GATEWAY, a->gw); break; case RTD_DEVICE: + if (!a->iface) + return; r.r.rtm_type = RTN_UNICAST; nl_add_attr_u32(&r.h, sizeof(r), RTA_OIF, a->iface->index); break; @@ -532,11 +534,8 @@ krt_set_notify(struct krt_proto *p, net *n UNUSED, rte *new, rte *old) else { if (old) - { - if (!old->attrs->iface || (old->attrs->iface->flags & IF_UP)) - nl_send_route(p, old, 0); - /* else the kernel has already flushed it */ - } + nl_send_route(p, old, 0); + if (new) nl_send_route(p, new, 1); } diff --git a/sysdep/linux/sysio.h b/sysdep/linux/sysio.h index 3a29cdc..b0aff71 100644 --- a/sysdep/linux/sysio.h +++ b/sysdep/linux/sysio.h @@ -139,3 +139,24 @@ static inline char *sysio_mcast_join(sock *s) #endif #endif + +#include <linux/socket.h> +#include <linux/tcp.h> + +/* For the case that we have older kernel headers */ +/* Copied from Linux kernel file include/linux/tcp.h */ + +#ifndef TCP_MD5SIG + +#define TCP_MD5SIG 14 +#define TCP_MD5SIG_MAXKEYLEN 80 + +struct tcp_md5sig { + struct __kernel_sockaddr_storage tcpm_addr; /* address associated */ + __u16 __tcpm_pad1; /* zero */ + __u16 tcpm_keylen; /* key length */ + __u32 __tcpm_pad2; /* zero */ + __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ +}; + +#endif |