Re: [PATCH rhel6] Allow ipv6 proxies and arp proxies be shown with iproute2 |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH rhel6] Allow ipv6 proxies and arp proxies be shown with iproute2
- From: Thomas Graf <tgraf@xxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2012 14:16:55 -0500
- Cc: xemul@xxxxxxxxxxxxx, devel@xxxxxxxxxx, davem@xxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx
- In-reply-to: <1327589392-10852-1-git-send-email-antonz@parallels.com>
- Mail-followup-to: Tony Zelenoff <antonz@xxxxxxxxxxxxx>, xemul@xxxxxxxxxxxxx, devel@xxxxxxxxxx, davem@xxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx
- User-agent: Mutt/1.5.20 (2009-08-17)
On Thu, Jan 26, 2012 at 06:49:52PM +0400, Tony Zelenoff wrote:
> + /* check for full ndmsg structure presence, family member is
> + * the same for both structures */
> + if (nlmsg_len(cb->nlh) == sizeof(struct ndmsg) &&
> + ((struct ndmsg *) nlmsg_data(cb->nlh))->ndm_flags == NTF_PROXY)
> + proxy = 1;
> +
Please change this check to nlmsg_len(cb->nlh) >= sizeof(struct ndmsg) so
we have the possibility to extend the request message in the future
without breaking backwards compatibility.
> s_t = cb->args[0];
>
> - for (tbl = neigh_tables, t = 0; tbl; tbl = tbl->next, t++) {
> + for (tbl = neigh_tables, t = 0; tbl && (err >= 0);
> + tbl = tbl->next, t++) {
> if (t < s_t || (family && tbl->family != family))
> continue;
> if (t > s_t)
> memset(&cb->args[1], 0, sizeof(cb->args) -
> sizeof(cb->args[0]));
> - if (neigh_dump_table(tbl, skb, cb) < 0)
> - break;
> + if (proxy) {
> + err = pneigh_dump_table(tbl, skb, cb);
> + continue;
> + }
> + err = neigh_dump_table(tbl, skb, cb);
Personally I would call neigh_dump_table() in the else branch and avoid
the continue statement.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion]
[Ethernet Bridging]
[Linux Wireless Networking]
[Linux Bluetooth Networking]
[Linux Networking Users]
[VLAN]
[Git]
[IETF Annouce]
[Linux Assembly]
[Security]
[Bugtraq]
[Photo]
[Singles Social Networking]
[Yosemite Information]
[MIPS Linux]
[ARM Linux Kernel]
[ARM Linux]
[Linux Virtualization]
[Linux Security]
[Linux IDE]
[Linux RAID]
[Linux SCSI]
[Free Dating]