-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nhrpd: unset noarp flag using a zapi message #15173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just had a couple of questions
@@ -351,6 +351,7 @@ void nhrp_interface_update(struct interface *ifp) | |||
if (!if_ad->configured) { | |||
os_configure_dmvpn(ifp->ifindex, ifp->name, | |||
afi2family(afi)); | |||
nhrp_interface_update_arp(ifp, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you move this out of "configure_dmvpn" on purpose, for some specific reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the goal is to migrate all things from nhrp_linux.c
zebra/interface.h
Outdated
@@ -314,6 +314,8 @@ extern int if_ipv6_address_install(struct interface *ifp, struct prefix *prefix, | |||
extern int if_ip_address_uinstall(struct interface *ifp, struct prefix *prefix); | |||
extern int if_shutdown(struct interface *ifp); | |||
extern int if_no_shutdown(struct interface *ifp); | |||
extern int if_arp_set(struct interface *ifp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like these two functions are almost identical - could you converge to one, that takes a boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other functions in interface.* are dispatched. Just used the same pattern.
Moreover, it is more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, "same pattern", we have lots of patterns that are old, and that we don't want to continue to use, eh?
for me, the duplication of code is enough that it's not clearer: it'd be better to have 20 lines once, and then just the two different "set/unset" lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK done
lib/zclient.c
Outdated
|
||
zclient_create_header(s, ZEBRA_INTERFACE_SET_ARP, ifp->vrf->vrf_id); | ||
|
||
stream_putl(s, ifp->vrf->vrf_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need this, since we have the vrf id in the message already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
e142b77
to
7f037f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me now, thanks. But there is a python style warning - can you clear that?
Add a ZAPI message to control the setting of the IFF_NOARP flag. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Unset the IFF_NOARP interface flag using a ZAPI message. It removes the dependency to if.h headers. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Test the absence the NOARP flag on rX-gre0 interfaces. It is present by default. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Remove the unused netlink_configure_arp() declaration. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7f037f1
to
6a44127
Compare
Unset the IFF_NOARP interface flag using a ZAPI message. It removes the dependency to if.h headers.