libnl all versions

jeff courington jeff_courington at hotmail.com
Tue May 31 13:45:59 EDT 2011


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;



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110531/6cae8abd/attachment.html>


More information about the libnl mailing list