diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-05-15 13:54:25 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-05-15 13:54:25 -0700 |
commit | ebde268b05fe09bf50e20cb4261c555dce145ee1 (patch) | |
tree | a79bc010454570f064fcbe49982b2d4c55ff387b /zebra | |
parent | f5d2190cfcb9aaa4da3b9aecc9199c851133a3b4 (diff) | |
parent | f384ea4adbf0ab4aa5e8c70241392aa3cfa1e678 (diff) | |
download | quagga-ebde268b05fe09bf50e20cb4261c555dce145ee1.tar.bz2 quagga-ebde268b05fe09bf50e20cb4261c555dce145ee1.tar.xz |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/rt_netlink.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 2fb72f4c..4b9daef4 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -287,7 +287,7 @@ netlink_request (int family, int type, struct nlsock *nl) req.nlh.nlmsg_len = sizeof req; req.nlh.nlmsg_type = type; req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; - req.nlh.nlmsg_pid = 0; + req.nlh.nlmsg_pid = nl->snl.nl_pid; req.nlh.nlmsg_seq = ++nl->seq; req.g.rtgen_family = family; @@ -370,13 +370,6 @@ netlink_parse_info (int (*filter) (struct sockaddr_nl *, struct nlmsghdr *), return -1; } - /* JF: Ignore messages that aren't from the kernel */ - if ( snl.nl_pid != 0 ) - { - zlog ( NULL, LOG_ERR, "Ignoring message from pid %u", snl.nl_pid ); - continue; - } - for (h = (struct nlmsghdr *) buf; NLMSG_OK (h, (unsigned int) status); h = NLMSG_NEXT (h, status)) { @@ -1087,6 +1080,13 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h) int netlink_information_fetch (struct sockaddr_nl *snl, struct nlmsghdr *h) { + /* JF: Ignore messages that aren't from the kernel */ + if ( snl->nl_pid != 0 ) + { + zlog ( NULL, LOG_ERR, "Ignoring message from pid %u", snl->nl_pid ); + return 0; + } + switch (h->nlmsg_type) { case RTM_NEWROUTE: |