summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog9
-rw-r--r--zebra/rt_netlink.c17
2 files changed, 14 insertions, 12 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index a75bd615..150c08a3 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-31 Hasso Tepper <hasso at quagga.net>
+
+ * rt_netlink.c (netlink_talk_filter): Show always warning message,
+ it's not for debug.
+ * rt_netlink.c (netlink_talk): Don't assume we use netlink_cmd
+ although we do now actually.
+ * rt_netlink.c (netlink_route, netlink_route_multipath): Always use
+ netlink_cmd to send messages to the kernel.
+
2005-03-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* irdp.h: Add prototype for irdp_sock_init, and fix protos for
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 7a78602e..042ee331 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1221,8 +1221,7 @@ addattr32 (struct nlmsghdr *n, int maxlen, int type, int data)
static int
netlink_talk_filter (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
- if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug ("netlink_talk: ignoring message type 0x%04x", h->nlmsg_type);
+ zlog_warn ("netlink_talk: ignoring message type 0x%04x", h->nlmsg_type);
return 0;
}
@@ -1241,13 +1240,13 @@ netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
memset (&snl, 0, sizeof snl);
snl.nl_family = AF_NETLINK;
- n->nlmsg_seq = ++netlink_cmd.seq;
+ n->nlmsg_seq = ++nl->seq;
/* Request an acknowledgement by setting NLM_F_ACK */
n->nlmsg_flags |= NLM_F_ACK;
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug ("netlink_talk: %s type %s(%u), seq=%u", netlink_cmd.name,
+ zlog_debug ("netlink_talk: %s type %s(%u), seq=%u", nl->name,
lookup (nlmsg_str, n->nlmsg_type), n->nlmsg_type,
n->nlmsg_seq);
@@ -1357,7 +1356,7 @@ netlink_route (int cmd, int family, void *dest, int length, void *gate,
snl.nl_family = AF_NETLINK;
/* Talk to netlink socket. */
- ret = netlink_talk (&req.n, &netlink);
+ ret = netlink_talk (&req.n, &netlink_cmd);
if (ret < 0)
return -1;
@@ -1373,7 +1372,6 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
struct sockaddr_nl snl;
struct nexthop *nexthop = NULL;
int nexthop_num = 0;
- struct nlsock *nl;
int discard;
struct
@@ -1639,13 +1637,8 @@ skip:
memset (&snl, 0, sizeof snl);
snl.nl_family = AF_NETLINK;
- if (family == AF_INET)
- nl = &netlink_cmd;
- else
- nl = &netlink;
-
/* Talk to netlink socket. */
- return netlink_talk (&req.n, nl);
+ return netlink_talk (&req.n, &netlink_cmd);
}
int