libnl all versions
Thomas Graf
tgraf at infradead.org
Wed Jun 15 10:23:59 EDT 2011
On Tue, May 31, 2011 at 01:45:59PM -0400, jeff courington wrote:
>
> This bug is in all version of libnl. The library does not set the ndm_flags so commands like adding a proxy arp entry fail
> lib/route/neigh.c
> /* Fix */
> static struct nl_msg * build_neigh_msg(struct rtnl_neigh *tmpl, int cmd, int flags){ struct nl_msg *msg; struct ndmsg nhdr = { .ndm_ifindex = tmpl->n_ifindex, .ndm_family = nl_addr_get_family(tmpl->n_dst), .ndm_flags = 0, .ndm_state = NUD_PERMANENT, };
> if (tmpl->ce_mask & NEIGH_ATTR_FLAGS) nhdr.ndm_flags = tmpl->n_flags;
> if (tmpl->ce_mask & NEIGH_ATTR_STATE) nhdr.ndm_state = tmpl->n_state;
>
> /* Original */
> static struct nl_msg * build_neigh_msg(struct rtnl_neigh *tmpl, int cmd, int flags){ struct nl_msg *msg; struct ndmsg nhdr = { .ndm_ifindex = tmpl->n_ifindex, .ndm_family = nl_addr_get_family(tmpl->n_dst), .ndm_state = NUD_PERMANENT, };
> if (tmpl->ce_mask & NEIGH_ATTR_STATE) nhdr.ndm_state = tmpl->n_state;
Fixed in commit c881908ac7a485512b74bcd583c5890f2ad2af19
Thanks
More information about the libnl
mailing list