-
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
nhrp: use zebra #8145
nhrp: use zebra #8145
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/d1b4407ed1b78b8195f5aa184f05889d/raw/c24f7439f0b1e309e9cb67983fd94416ff866586/cr_8145_1614183205.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 0cb8d3938..dc9360e67 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -897,8 +897,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index a081aca60..f43a42091 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -80,7 +81,8 @@ extern int mpls_kernel_init(void);
extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
-extern int kernel_configure_arp(struct interface *ifp, int family, ns_id_t ns_id);
+extern int kernel_configure_arp(struct interface *ifp, int family,
+ ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
* state.
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index b20317ab4..a6c3a2b81 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1538,7 +1538,8 @@ static void _netlink_mpls_debug(int cmd, uint32_t label, const char *routedesc)
routedesc, nl_msg_type_to_str(cmd), label);
}
-static int netlink_configure_arp(struct interface *ifp, int family, ns_id_t ns_id)
+static int netlink_configure_arp(struct interface *ifp, int family,
+ ns_id_t ns_id)
{
struct {
struct nlmsghdr n;
@@ -1559,23 +1560,23 @@ static int netlink_configure_arp(struct interface *ifp, int family, ns_id_t ns_i
req.ndtm.ndtm_family = family;
- nl_attr_put(&req.n, sizeof(req), NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req.n, sizeof(req), NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
rta->rta_type = NDTA_PARMS;
rta->rta_len = RTA_LENGTH(0);
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_IFINDEX, &ifp->ifindex, sizeof(ifp->ifindex));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_IFINDEX, &ifp->ifindex,
+ sizeof(ifp->ifindex));
val = 1;
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_APP_PROBES, &val, sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_APP_PROBES, &val,
+ sizeof(val));
val = 0;
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_MCAST_PROBES, &val, sizeof(val));
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_UCAST_PROBES, &val, sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_MCAST_PROBES, &val,
+ sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_UCAST_PROBES, &val,
+ sizeof(val));
nl_attr_put(&req.n, NL_PKT_BUF_SIZE, NDTA_PARMS, RTA_DATA(rta),
- RTA_PAYLOAD(rta));
+ RTA_PAYLOAD(rta));
return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
0);
@@ -2725,9 +2726,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -3411,35 +3412,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3714,8 +3715,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3862,8 +3863,7 @@ netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
false);
}
-int kernel_configure_arp(struct interface *ifp, int family,
- ns_id_t ns_id)
+int kernel_configure_arp(struct interface *ifp, int family, ns_id_t ns_id)
{
return netlink_configure_arp(ifp, family, ns_id);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 6ef091d7a..cbbc9b28f 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,8 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
/* TODO */
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index fb696d8c0..04743c2b7 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3194,8 +3190,7 @@ stream_failure:
static int zebra_neigh_read_ip(struct stream *s, struct prefix *add)
{
STREAM_GETC(s, add->family);
- if (add->family != AF_INET &&
- add->family != AF_INET6)
+ if (add->family != AF_INET && add->family != AF_INET6)
return -1;
STREAM_GET(&add->u.prefix, s, family2addrsize(add->family));
if (add->family == AF_INET)
@@ -3270,7 +3265,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
ns_id = zvrf->zns->ns_id;
@@ -3298,8 +3293,8 @@ static inline void zebra_neigh_add(ZAPI_HANDLER_ARGS)
return;
kernel_neigh_update(1, api.index, &api.pfx_in.u.prefix,
(char *)&api.pfx_out.u.prefix,
- family2addrsize(api.pfx_out.family),
- ns_id, api.pfx_in.family, false, client->proto);
+ family2addrsize(api.pfx_out.family), ns_id,
+ api.pfx_in.family, false, client->proto);
}
static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
@@ -3318,13 +3313,11 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
ret = zebra_neigh_get(s, &api, false);
if (ret < 0)
return;
- kernel_neigh_update(0, api.index, &api.pfx_in.u.prefix,
- NULL, 0, ns_id, api.pfx_in.family,
- true, client->proto);
+ kernel_neigh_update(0, api.index, &api.pfx_in.u.prefix, NULL, 0, ns_id,
+ api.pfx_in.family, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedFedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/F29BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI011BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/DEB10BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI009BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1804AMD64/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/FBSD12AMD64/config.status/config.status Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1604I386/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1804PPC64LEBUILD/config.status/config.status Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI021BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI012BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI014BUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI008BLD/config.status/config.status Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsFedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/F29BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI011BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/DEB10BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI009BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1804AMD64/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/FBSD12AMD64/config.status/config.status Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1604I386/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U1804PPC64LEBUILD/config.status/config.status Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI021BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI012BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI014BUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17306/artifact/CI008BLD/config.status/config.status
|
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
5f83300
to
8839635
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/c64d80162c10b88486e2fead066ba87a/raw/75661dcbeae5c9fd53fc1dd80a4a278c47884d8b/cr_8145_1614269922.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 71ee10c96..a1f9dfcae 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index a081aca60..f43a42091 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -80,7 +81,8 @@ extern int mpls_kernel_init(void);
extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
-extern int kernel_configure_arp(struct interface *ifp, int family, ns_id_t ns_id);
+extern int kernel_configure_arp(struct interface *ifp, int family,
+ ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
* state.
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index fb6213d05..29e09e052 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1542,7 +1542,8 @@ static void _netlink_mpls_debug(int cmd, uint32_t label, const char *routedesc)
routedesc, nl_msg_type_to_str(cmd), label);
}
-static int netlink_configure_arp(struct interface *ifp, int family, ns_id_t ns_id)
+static int netlink_configure_arp(struct interface *ifp, int family,
+ ns_id_t ns_id)
{
struct {
struct nlmsghdr n;
@@ -1563,23 +1564,23 @@ static int netlink_configure_arp(struct interface *ifp, int family, ns_id_t ns_i
req.ndtm.ndtm_family = family;
- nl_attr_put(&req.n, sizeof(req), NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req.n, sizeof(req), NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
rta->rta_type = NDTA_PARMS;
rta->rta_len = RTA_LENGTH(0);
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_IFINDEX, &ifp->ifindex, sizeof(ifp->ifindex));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_IFINDEX, &ifp->ifindex,
+ sizeof(ifp->ifindex));
val = 1;
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_APP_PROBES, &val, sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_APP_PROBES, &val,
+ sizeof(val));
val = 0;
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_MCAST_PROBES, &val, sizeof(val));
- rta_addattr_l(rta, NL_PKT_BUF_SIZE,
- NDTPA_UCAST_PROBES, &val, sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_MCAST_PROBES, &val,
+ sizeof(val));
+ rta_addattr_l(rta, NL_PKT_BUF_SIZE, NDTPA_UCAST_PROBES, &val,
+ sizeof(val));
nl_attr_put(&req.n, NL_PKT_BUF_SIZE, NDTA_PARMS, RTA_DATA(rta),
- RTA_PAYLOAD(rta));
+ RTA_PAYLOAD(rta));
return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
0);
@@ -1618,7 +1619,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2729,9 +2731,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2747,7 +2749,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2765,9 +2768,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2869,10 +2872,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3311,9 +3315,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3417,35 +3421,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3720,8 +3724,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3777,8 +3781,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3829,14 +3833,14 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
static ssize_t netlink_neigh_msg_encoder(struct zebra_dplane_ctx *ctx,
@@ -3888,8 +3892,7 @@ netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
false);
}
-int kernel_configure_arp(struct interface *ifp, int family,
- ns_id_t ns_id)
+int kernel_configure_arp(struct interface *ifp, int family, ns_id_t ns_id)
{
return netlink_configure_arp(ifp, family, ns_id);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 6ef091d7a..cbbc9b28f 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,8 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
/* TODO */
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index df36742c7..840f82358 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3270,7 +3265,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
ns_id = zvrf->zns->ns_id;
@@ -3315,11 +3310,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 6e24a4f5f..65214d108 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -485,14 +485,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1670,8 +1667,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -3246,7 +3243,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3261,11 +3259,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3433,9 +3431,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3467,9 +3465,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3485,9 +3483,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3510,9 +3507,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3536,8 +3532,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3548,8 +3544,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3558,14 +3555,10 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3589,8 +3582,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index 6b0c64a1e..903f859ac 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -178,8 +178,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -455,8 +455,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedNetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI012BUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/F29BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI009BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI011BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/DEB10BUILD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/FBSD12AMD64/config.status/config.status CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsNetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI012BUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/F29BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI009BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CI011BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/DEB10BUILD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/FBSD12AMD64/config.status/config.status CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17323/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz>
|
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
8839635
to
a3e350d
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/2b7b7d05fe3ae63611e8123554990706/raw/4730d93c1e7b18c1fadee80c7eed5f005de5917c/cr_8145_1614332993.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 71ee10c96..a1f9dfcae 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index 76ea91e89..3222a59a7 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -81,8 +82,7 @@ extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
extern int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
- ns_id_t ns_id);
+ struct interface *link_ifp, ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index d613e7a82..5414dec5c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1575,7 +1575,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2686,9 +2687,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2704,7 +2705,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2722,9 +2724,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2826,10 +2828,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3268,9 +3271,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3374,35 +3377,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3677,8 +3680,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3734,8 +3737,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3786,19 +3789,18 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
-static int
-netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
- void *data, size_t datalen)
+static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
+ void *data, size_t datalen)
{
struct {
struct nlmsghdr n;
@@ -3821,24 +3823,22 @@ netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
req->n.nlmsg_type = RTM_SETNEIGHTBL;
req->ndtm.ndtm_family = family;
- nl_attr_put(&req->n, datalen, NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req->n, datalen, NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
nest = nl_attr_nest(&req->n, datalen, NDTA_PARMS);
if (nest == NULL)
return 0;
- if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx,
- sizeof(idx)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx, sizeof(idx)))
return 0;
val = dplane_ctx_neightable_get_app_probes(ctx);
- if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val,
- sizeof(val)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val, sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_mcast_probes(ctx);
if (!nl_attr_put(&req->n, datalen, NDTPA_MCAST_PROBES, &val,
sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_ucast_probes(ctx);
- if (!nl_attr_put(&req->n, datalen,NDTPA_UCAST_PROBES, &val,
+ if (!nl_attr_put(&req->n, datalen, NDTPA_UCAST_PROBES, &val,
sizeof(val)))
return 0;
nl_attr_nest_end(&req->n, nest);
@@ -3893,7 +3893,8 @@ enum netlink_msg_status netlink_put_mac_update_msg(struct nl_batch *bth,
enum netlink_msg_status
netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
-{ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
+{
+ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
false);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 2b9826bc1..ada828d01 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,8 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
/* TODO */
return 0;
@@ -395,8 +394,7 @@ enum zebra_dplane_result kernel_mac_update_ctx(struct zebra_dplane_ctx *ctx)
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}
-int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
+int kernel_configure_if_link(struct interface *ifp, struct interface *link_ifp,
ns_id_t ns_id)
{
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f009ea8a..cec2e5b96 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3269,7 +3264,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
dplane_neigh_table_update(ifp, fam, 1, 0, 0);
@@ -3313,11 +3308,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index fbead4c98..a7f88fa14 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -232,8 +232,7 @@ struct dplane_neigh_info {
/*
* Neighbor Table
*/
-struct dplane_neigh_table
-{
+struct dplane_neigh_table {
uint8_t family;
uint32_t app_probes;
uint32_t ucast_probes;
@@ -500,14 +499,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1689,8 +1685,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -1923,8 +1919,7 @@ uint32_t dplane_intf_extra_get_status(const struct dplane_intf_extra *ptr)
return ptr->status;
}
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -3297,7 +3292,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3312,11 +3308,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3484,9 +3480,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3518,9 +3514,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3536,9 +3532,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3561,9 +3556,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3587,8 +3581,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3599,8 +3593,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3659,21 +3654,16 @@ enum zebra_dplane_result dplane_neigh_table_update(const struct interface *ifp,
}
return result;
-
}
/*
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3697,8 +3687,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
@@ -3883,8 +3873,8 @@ int dplane_show_helper(struct vty *vty, bool detailed)
memory_order_relaxed);
errs = atomic_load_explicit(&zdplane_info.dg_neigtable_errors,
memory_order_relaxed);
- vty_out(vty, "Neighbor Table updates: %"PRIu64"\n", incoming);
- vty_out(vty, "Neighbor Table errors: %"PRIu64"\n", errs);
+ vty_out(vty, "Neighbor Table updates: %" PRIu64 "\n", incoming);
+ vty_out(vty, "Neighbor Table errors: %" PRIu64 "\n", errs);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index daee6dd30..cfa0fdcb2 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -180,8 +180,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -457,8 +457,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
@@ -497,8 +497,7 @@ uint32_t
dplane_ctx_get_br_port_backup_nhg_id(const struct zebra_dplane_ctx *ctx);
/* Accessors for neighbor table information */
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
uint32_t
dplane_ctx_neightable_get_app_probes(const struct zebra_dplane_ctx *ctx);
uint32_t
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Outdated results 🛑Basic BGPD CI results: FAILURE
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedUbuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI021BUILD/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1804PPC64LEBUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1604I386/config.status/config.status Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/F29BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
CentOS 7 amd64 build: Failed (click for details)Make failed for CentOS 7 amd64 build:
CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI005BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/DEB10BUILD/config.status/config.status Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI008BLD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/FBSD12AMD64/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI011BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI012BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI014BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI009BUILD/config.status/config.status Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1804AMD64/config.status/config.status Warnings Generated during build:Checkout code: Successful with additional warningsUbuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI021BUILD/config.status/config.status Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1804PPC64LEBUILD/config.status/config.status Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1604I386/config.status/config.status Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/F29BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
CentOS 7 amd64 build: Failed (click for details)Make failed for CentOS 7 amd64 build:
CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI005BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/DEB10BUILD/config.status/config.status Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI008BLD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/FBSD12AMD64/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI011BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI012BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI014BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/CI009BUILD/config.status/config.status Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17328/artifact/U1804AMD64/config.status/config.status
|
a3e350d
to
077cc5c
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/55bdf5f9ac124faa46645e3111fe079a/raw/13cbc4de445109aa308434b2da29c8fe69ac4661/cr_8145_1614337213.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 71ee10c96..a1f9dfcae 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index 76ea91e89..3222a59a7 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -81,8 +82,7 @@ extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
extern int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
- ns_id_t ns_id);
+ struct interface *link_ifp, ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index d613e7a82..5414dec5c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1575,7 +1575,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2686,9 +2687,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2704,7 +2705,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2722,9 +2724,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2826,10 +2828,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3268,9 +3271,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3374,35 +3377,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3677,8 +3680,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3734,8 +3737,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3786,19 +3789,18 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
-static int
-netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
- void *data, size_t datalen)
+static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
+ void *data, size_t datalen)
{
struct {
struct nlmsghdr n;
@@ -3821,24 +3823,22 @@ netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
req->n.nlmsg_type = RTM_SETNEIGHTBL;
req->ndtm.ndtm_family = family;
- nl_attr_put(&req->n, datalen, NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req->n, datalen, NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
nest = nl_attr_nest(&req->n, datalen, NDTA_PARMS);
if (nest == NULL)
return 0;
- if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx,
- sizeof(idx)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx, sizeof(idx)))
return 0;
val = dplane_ctx_neightable_get_app_probes(ctx);
- if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val,
- sizeof(val)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val, sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_mcast_probes(ctx);
if (!nl_attr_put(&req->n, datalen, NDTPA_MCAST_PROBES, &val,
sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_ucast_probes(ctx);
- if (!nl_attr_put(&req->n, datalen,NDTPA_UCAST_PROBES, &val,
+ if (!nl_attr_put(&req->n, datalen, NDTPA_UCAST_PROBES, &val,
sizeof(val)))
return 0;
nl_attr_nest_end(&req->n, nest);
@@ -3893,7 +3893,8 @@ enum netlink_msg_status netlink_put_mac_update_msg(struct nl_batch *bth,
enum netlink_msg_status
netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
-{ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
+{
+ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
false);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 2b9826bc1..ada828d01 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,8 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
/* TODO */
return 0;
@@ -395,8 +394,7 @@ enum zebra_dplane_result kernel_mac_update_ctx(struct zebra_dplane_ctx *ctx)
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}
-int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
+int kernel_configure_if_link(struct interface *ifp, struct interface *link_ifp,
ns_id_t ns_id)
{
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f009ea8a..cec2e5b96 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3269,7 +3264,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
dplane_neigh_table_update(ifp, fam, 1, 0, 0);
@@ -3313,11 +3308,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 743417168..e1c120e52 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -232,8 +232,7 @@ struct dplane_neigh_info {
/*
* Neighbor Table
*/
-struct dplane_neigh_table
-{
+struct dplane_neigh_table {
uint8_t family;
uint32_t app_probes;
uint32_t ucast_probes;
@@ -500,14 +499,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1689,8 +1685,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -1923,8 +1919,7 @@ uint32_t dplane_intf_extra_get_status(const struct dplane_intf_extra *ptr)
return ptr->status;
}
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -3297,7 +3292,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3312,11 +3308,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3484,9 +3480,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3518,9 +3514,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3536,9 +3532,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3561,9 +3556,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3587,8 +3581,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3599,8 +3593,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3659,21 +3654,16 @@ enum zebra_dplane_result dplane_neigh_table_update(const struct interface *ifp,
}
return result;
-
}
/*
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3697,8 +3687,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
@@ -3883,8 +3873,8 @@ int dplane_show_helper(struct vty *vty, bool detailed)
memory_order_relaxed);
errs = atomic_load_explicit(&zdplane_info.dg_neightable_errors,
memory_order_relaxed);
- vty_out(vty, "Neighbor Table updates: %"PRIu64"\n", incoming);
- vty_out(vty, "Neighbor Table errors: %"PRIu64"\n", errs);
+ vty_out(vty, "Neighbor Table updates: %" PRIu64 "\n", incoming);
+ vty_out(vty, "Neighbor Table errors: %" PRIu64 "\n", errs);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index daee6dd30..cfa0fdcb2 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -180,8 +180,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -457,8 +457,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
@@ -497,8 +497,7 @@ uint32_t
dplane_ctx_get_br_port_backup_nhg_id(const struct zebra_dplane_ctx *ctx);
/* Accessors for neighbor table information */
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
uint32_t
dplane_ctx_neightable_get_app_probes(const struct zebra_dplane_ctx *ctx);
uint32_t
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedUbuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1604I386/config.status/config.status Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/F29BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/DEB10BUILD/config.status/config.status Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/FBSD12AMD64/config.status/config.status Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1804AMD64/config.status/config.status Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI008BLD/config.status/config.status CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1804PPC64LEBUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI012BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI011BUILD/config.status/config.status Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI021BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI009BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI014BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsUbuntu 18.04 arm7 build: Failed (click for details)Make failed for Ubuntu 18.04 arm7 build:
Ubuntu 18.04 arm7 build: Unknown Log <config.log.gz> Ubuntu 20.04 amd64 build: Failed (click for details)Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U2004AMD64BUILD/config.status/config.statusMake failed for Ubuntu 20.04 amd64 build:
Ubuntu 20.04 amd64 build: Unknown Log <config.log.gz> Ubuntu 16.04 i386 build: Failed (click for details)Make failed for Ubuntu 16.04 i386 build:
Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1604I386/config.status/config.status Fedora 29 amd64 build: Failed (click for details)Make failed for Fedora 29 amd64 build:
Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/F29BUILD/config.status/config.status Debian 10 amd64 build: Failed (click for details)Debian 10 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/DEB10BUILD/config.log/config.log.gzMake failed for Debian 10 amd64 build:
Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/DEB10BUILD/config.status/config.status Ubuntu 16.04 arm8 build: Failed (click for details)Make failed for Ubuntu 16.04 arm8 build:
Ubuntu 16.04 arm8 build: Unknown Log <config.log.gz> FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/FBSD12AMD64/config.status/config.status Ubuntu 18.04 amd64 build: Failed (click for details)Make failed for Ubuntu 18.04 amd64 build:
Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1804AMD64/config.status/config.status Ubuntu 16.04 arm7 build: Failed (click for details)Ubuntu 16.04 arm7 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI101BUILD/config.status/config.status Ubuntu 16.04 arm7 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI101BUILD/config.log/config.log.gzMake failed for Ubuntu 16.04 arm7 build:
Debian 8 amd64 build: Failed (click for details)Debian 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI008BLD/config.log/config.log.gzMake failed for Debian 8 amd64 build:
Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI008BLD/config.status/config.status CentOS 8 amd64 build: Failed (click for details)CentOS 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CENTOS8BUILD/config.status/config.statusMake failed for CentOS 8 amd64 build:
CentOS 8 amd64 build: Unknown Log <config.log.gz> Ubuntu 18.04 ppc64le build: Failed (click for details)Make failed for Ubuntu 18.04 ppc64le build:
Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U1804PPC64LEBUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI012BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI011BUILD/config.status/config.status Debian 9 amd64 build: Failed (click for details)Make failed for Debian 9 amd64 build:
Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI021BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI009BUILD/config.status/config.status Ubuntu 16.04 amd64 build: Failed (click for details)Make failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/CI014BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U18ARM8BUILD/config.status/config.status Ubuntu 18.04 arm8 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17330/artifact/U18ARM8BUILD/config.log/config.log.gzMake failed for Ubuntu 18.04 arm8 build:
|
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
077cc5c
to
18a9677
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/57809e585c2b036e573b7b213de1eb96/raw/13cbc4de445109aa308434b2da29c8fe69ac4661/cr_8145_1614344006.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 71ee10c96..a1f9dfcae 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index 76ea91e89..3222a59a7 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -81,8 +82,7 @@ extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
extern int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
- ns_id_t ns_id);
+ struct interface *link_ifp, ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index d613e7a82..5414dec5c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1575,7 +1575,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2686,9 +2687,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2704,7 +2705,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2722,9 +2724,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2826,10 +2828,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3268,9 +3271,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3374,35 +3377,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3677,8 +3680,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3734,8 +3737,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3786,19 +3789,18 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
-static int
-netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
- void *data, size_t datalen)
+static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
+ void *data, size_t datalen)
{
struct {
struct nlmsghdr n;
@@ -3821,24 +3823,22 @@ netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
req->n.nlmsg_type = RTM_SETNEIGHTBL;
req->ndtm.ndtm_family = family;
- nl_attr_put(&req->n, datalen, NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req->n, datalen, NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
nest = nl_attr_nest(&req->n, datalen, NDTA_PARMS);
if (nest == NULL)
return 0;
- if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx,
- sizeof(idx)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx, sizeof(idx)))
return 0;
val = dplane_ctx_neightable_get_app_probes(ctx);
- if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val,
- sizeof(val)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val, sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_mcast_probes(ctx);
if (!nl_attr_put(&req->n, datalen, NDTPA_MCAST_PROBES, &val,
sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_ucast_probes(ctx);
- if (!nl_attr_put(&req->n, datalen,NDTPA_UCAST_PROBES, &val,
+ if (!nl_attr_put(&req->n, datalen, NDTPA_UCAST_PROBES, &val,
sizeof(val)))
return 0;
nl_attr_nest_end(&req->n, nest);
@@ -3893,7 +3893,8 @@ enum netlink_msg_status netlink_put_mac_update_msg(struct nl_batch *bth,
enum netlink_msg_status
netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
-{ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
+{
+ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
false);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 2b9826bc1..ada828d01 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,8 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
/* TODO */
return 0;
@@ -395,8 +394,7 @@ enum zebra_dplane_result kernel_mac_update_ctx(struct zebra_dplane_ctx *ctx)
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}
-int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
+int kernel_configure_if_link(struct interface *ifp, struct interface *link_ifp,
ns_id_t ns_id)
{
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f009ea8a..cec2e5b96 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3269,7 +3264,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
dplane_neigh_table_update(ifp, fam, 1, 0, 0);
@@ -3313,11 +3308,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 743417168..e1c120e52 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -232,8 +232,7 @@ struct dplane_neigh_info {
/*
* Neighbor Table
*/
-struct dplane_neigh_table
-{
+struct dplane_neigh_table {
uint8_t family;
uint32_t app_probes;
uint32_t ucast_probes;
@@ -500,14 +499,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1689,8 +1685,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -1923,8 +1919,7 @@ uint32_t dplane_intf_extra_get_status(const struct dplane_intf_extra *ptr)
return ptr->status;
}
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -3297,7 +3292,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3312,11 +3308,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3484,9 +3480,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3518,9 +3514,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3536,9 +3532,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3561,9 +3556,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3587,8 +3581,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3599,8 +3593,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3659,21 +3654,16 @@ enum zebra_dplane_result dplane_neigh_table_update(const struct interface *ifp,
}
return result;
-
}
/*
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3697,8 +3687,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
@@ -3883,8 +3873,8 @@ int dplane_show_helper(struct vty *vty, bool detailed)
memory_order_relaxed);
errs = atomic_load_explicit(&zdplane_info.dg_neightable_errors,
memory_order_relaxed);
- vty_out(vty, "Neighbor Table updates: %"PRIu64"\n", incoming);
- vty_out(vty, "Neighbor Table errors: %"PRIu64"\n", errs);
+ vty_out(vty, "Neighbor Table updates: %" PRIu64 "\n", incoming);
+ vty_out(vty, "Neighbor Table errors: %" PRIu64 "\n", errs);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index daee6dd30..cfa0fdcb2 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -180,8 +180,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -457,8 +457,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
@@ -497,8 +497,7 @@ uint32_t
dplane_ctx_get_br_port_backup_nhg_id(const struct zebra_dplane_ctx *ctx);
/* Accessors for neighbor table information */
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
uint32_t
dplane_ctx_neightable_get_app_probes(const struct zebra_dplane_ctx *ctx);
uint32_t
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
18a9677
to
2fca3e1
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/64b75c9fd9c99f66427bcbc74f92743c/raw/316b72b1220443436a6a34a59831fdb0a45fd292/cr_8145_1614345355.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index 71ee10c96..a1f9dfcae 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true, RTPROT_ZEBRA);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true, RTPROT_ZEBRA);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index 76ea91e89..3222a59a7 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent, uint8_t protocol);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -81,8 +82,7 @@ extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
extern int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
- ns_id_t ns_id);
+ struct interface *link_ifp, ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index d613e7a82..5414dec5c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1575,7 +1575,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2686,9 +2687,9 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t client_proto)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t client_proto)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2704,7 +2705,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2722,9 +2724,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2826,10 +2828,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3268,9 +3271,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3374,35 +3377,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3677,8 +3680,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3734,8 +3737,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3786,19 +3789,18 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
-static int
-netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
- void *data, size_t datalen)
+static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
+ void *data, size_t datalen)
{
struct {
struct nlmsghdr n;
@@ -3821,24 +3823,22 @@ netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
req->n.nlmsg_type = RTM_SETNEIGHTBL;
req->ndtm.ndtm_family = family;
- nl_attr_put(&req->n, datalen, NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req->n, datalen, NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
nest = nl_attr_nest(&req->n, datalen, NDTA_PARMS);
if (nest == NULL)
return 0;
- if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx,
- sizeof(idx)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx, sizeof(idx)))
return 0;
val = dplane_ctx_neightable_get_app_probes(ctx);
- if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val,
- sizeof(val)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val, sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_mcast_probes(ctx);
if (!nl_attr_put(&req->n, datalen, NDTPA_MCAST_PROBES, &val,
sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_ucast_probes(ctx);
- if (!nl_attr_put(&req->n, datalen,NDTPA_UCAST_PROBES, &val,
+ if (!nl_attr_put(&req->n, datalen, NDTPA_UCAST_PROBES, &val,
sizeof(val)))
return 0;
nl_attr_nest_end(&req->n, nest);
@@ -3893,7 +3893,8 @@ enum netlink_msg_status netlink_put_mac_update_msg(struct nl_batch *bth,
enum netlink_msg_status
netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
-{ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
+{
+ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
false);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 27ed6b11d..5de8594c8 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,9 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t protocol)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t protocol)
{
/* TODO */
return 0;
@@ -395,8 +395,7 @@ enum zebra_dplane_result kernel_mac_update_ctx(struct zebra_dplane_ctx *ctx)
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}
-int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
+int kernel_configure_if_link(struct interface *ifp, struct interface *link_ifp,
ns_id_t ns_id)
{
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f009ea8a..cec2e5b96 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3269,7 +3264,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
dplane_neigh_table_update(ifp, fam, 1, 0, 0);
@@ -3313,11 +3308,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 743417168..e1c120e52 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -232,8 +232,7 @@ struct dplane_neigh_info {
/*
* Neighbor Table
*/
-struct dplane_neigh_table
-{
+struct dplane_neigh_table {
uint8_t family;
uint32_t app_probes;
uint32_t ucast_probes;
@@ -500,14 +499,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1689,8 +1685,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -1923,8 +1919,7 @@ uint32_t dplane_intf_extra_get_status(const struct dplane_intf_extra *ptr)
return ptr->status;
}
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -3297,7 +3292,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3312,11 +3308,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3484,9 +3480,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3518,9 +3514,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3536,9 +3532,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3561,9 +3556,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3587,8 +3581,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3599,8 +3593,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3659,21 +3654,16 @@ enum zebra_dplane_result dplane_neigh_table_update(const struct interface *ifp,
}
return result;
-
}
/*
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3697,8 +3687,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
@@ -3883,8 +3873,8 @@ int dplane_show_helper(struct vty *vty, bool detailed)
memory_order_relaxed);
errs = atomic_load_explicit(&zdplane_info.dg_neightable_errors,
memory_order_relaxed);
- vty_out(vty, "Neighbor Table updates: %"PRIu64"\n", incoming);
- vty_out(vty, "Neighbor Table errors: %"PRIu64"\n", errs);
+ vty_out(vty, "Neighbor Table updates: %" PRIu64 "\n", incoming);
+ vty_out(vty, "Neighbor Table errors: %" PRIu64 "\n", errs);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index daee6dd30..cfa0fdcb2 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -180,8 +180,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -457,8 +457,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
@@ -497,8 +497,7 @@ uint32_t
dplane_ctx_get_br_port_backup_nhg_id(const struct zebra_dplane_ctx *ctx);
/* Accessors for neighbor table information */
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
uint32_t
dplane_ctx_neightable_get_app_probes(const struct zebra_dplane_ctx *ctx);
uint32_t
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedFreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/FBSD12AMD64/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI009BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI011BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI012BUILD/config.status/config.status Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsFreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/FBSD12AMD64/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI009BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI011BUILD/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17334/artifact/CI012BUILD/config.status/config.status
|
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedFreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI009BUILD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/FBSD12AMD64/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI012BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI011BUILD/config.status/config.status Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsFreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI009BUILD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/FBSD12AMD64/config.status/config.status NetBSD 8 amd64 build: Failed (click for details)NetBSD 8 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 8 amd64 build:
NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI012BUILD/config.status/config.status OpenBSD 6 amd64 build: Failed (click for details)Make failed for OpenBSD 6 amd64 build:
OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17335/artifact/CI011BUILD/config.status/config.status
|
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
2fca3e1
to
5ea05ca
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/2bfa2eeabbe3eee7688498299fce8a6d/raw/00a1eda5de71f0418919d503ce8ff0ada63d2a37/cr_8145_1614585819.diff | git apply
diff --git a/lib/zclient.c b/lib/zclient.c
index 70a886b7d..0760f3a03 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -3913,18 +3913,18 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEIGH_ADDED:
if (zclient->neighbor_added)
- (*zclient->neighbor_added)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_added)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_REMOVED:
if (zclient->neighbor_removed)
- (*zclient->neighbor_removed)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_removed)(command, zclient, length,
+ vrf_id);
break;
case ZEBRA_NEIGH_GET:
if (zclient->neighbor_got)
- (*zclient->neighbor_got)(command, zclient,
- length, vrf_id);
+ (*zclient->neighbor_got)(command, zclient, length,
+ vrf_id);
break;
default:
break;
diff --git a/zebra/interface.c b/zebra/interface.c
index f8b1b2bb3..0d2d07708 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -899,8 +899,8 @@ void if_nbr_mac_to_ipv4ll_neigh_update(struct interface *ifp,
* Remove and re-add any existing neighbor entry for this address,
* since Netlink doesn't currently offer update message types.
*/
- kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr,
- mac, 6, ns_id, AF_INET, true);
+ kernel_neigh_update(0, ifp->ifindex, (void *)&ipv4_ll.s_addr, mac, 6,
+ ns_id, AF_INET, true);
/* Add new neighbor entry.
*
diff --git a/zebra/rt.h b/zebra/rt.h
index a816c49b6..daaa926a7 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -71,7 +71,8 @@ kernel_pbr_rule_update(struct zebra_dplane_ctx *ctx);
extern int kernel_neigh_update(int cmd, int ifindex, void *addr, char *lla,
int llalen, ns_id_t ns_id, uint8_t family,
bool permanent);
-extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg);
+extern int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client,
+ bool reg);
extern int kernel_interface_set_master(struct interface *master,
struct interface *slave);
@@ -81,8 +82,7 @@ extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
extern int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
- ns_id_t ns_id);
+ struct interface *link_ifp, ns_id_t ns_id);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index ac52d0bb2..fea3537d4 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1575,7 +1575,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
nl_attr_put(&req.n, sizeof(req), NDA_PROTOCOL, &protocol,
sizeof(protocol));
req.ndm.ndm_type = RTN_UNICAST;
- nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family));
+ nl_attr_put(&req.n, sizeof(req), NDA_DST, addr,
+ family2addrsize(family));
if (lla)
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
@@ -2686,9 +2687,8 @@ int netlink_nexthop_read(struct zebra_ns *zns)
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent)
{
return netlink_neigh_update(add ? RTM_NEWNEIGH : RTM_DELNEIGH, ifindex,
addr, lla, llalen, ns_id, family, permanent,
@@ -2704,7 +2704,8 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* @ctx: Dataplane context
* @cmd: Netlink command (RTM_NEWNEIGH or RTM_DELNEIGH)
* @lla: A pointer to neighbor cache link layer address
- * @llalen: Length of the pointer to neighbor cache link layer address
+ * @llalen: Length of the pointer to neighbor cache link layer
+ *address
* @ip: A neighbor cache n/w layer destination address
* In the case of bridge FDB, this represnts the remote
* VTEP IP.
@@ -2722,9 +2723,9 @@ int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
* otherwise the number of bytes written to buf.
*/
static ssize_t netlink_neigh_update_msg_encode(
- const struct zebra_dplane_ctx *ctx, int cmd, const void *lla, int llalen,
- const struct ipaddr *ip, bool replace_obj, uint8_t family, uint8_t type,
- uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
+ const struct zebra_dplane_ctx *ctx, int cmd, const void *lla,
+ int llalen, const struct ipaddr *ip, bool replace_obj, uint8_t family,
+ uint8_t type, uint8_t flags, uint16_t state, uint32_t nhg_id, bool nfy,
uint8_t nfy_flags, bool ext, uint32_t ext_flags, void *data,
size_t datalen, uint8_t protocol)
{
@@ -2826,10 +2827,11 @@ netlink_vxlan_flood_update_ctx(const struct zebra_dplane_ctx *ctx, int cmd,
struct ethaddr dst_mac = {.octet = {0}};
return netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)&dst_mac, ETH_ALEN, dplane_ctx_neigh_get_ipaddr(ctx),
- false, PF_BRIDGE, 0, NTF_SELF, (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/,
- false /*nfy*/, 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/,
- buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, (const void *)&dst_mac, ETH_ALEN,
+ dplane_ctx_neigh_get_ipaddr(ctx), false, PF_BRIDGE, 0, NTF_SELF,
+ (NUD_NOARP | NUD_PERMANENT), 0 /*nhg*/, false /*nfy*/,
+ 0 /*nfy_flags*/, false /*ext*/, 0 /*ext_flags*/, buf, buflen,
+ zebra2proto(dplane_ctx_get_type(ctx)));
}
#ifndef NDA_RTA
@@ -3268,9 +3270,9 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
}
total = netlink_neigh_update_msg_encode(
- ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN, &vtep_ip,
- true, AF_BRIDGE, 0, flags, state, nhg_id, nfy, nfy_flags,
- false /*ext*/, 0 /*ext_flags*/, data, datalen,
+ ctx, cmd, (const void *)dplane_ctx_mac_get_addr(ctx), ETH_ALEN,
+ &vtep_ip, true, AF_BRIDGE, 0, flags, state, nhg_id, nfy,
+ nfy_flags, false /*ext*/, 0 /*ext_flags*/, data, datalen,
zebra2proto(dplane_ctx_get_type(ctx)));
return total;
@@ -3374,35 +3376,35 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
* - struct ipaddr ( for DEL and GET)
* - struct ethaddr mac; (for NEW)
*/
- if(h->nlmsg_type == RTM_NEWNEIGH)
+ if (h->nlmsg_type == RTM_NEWNEIGH)
cmd = ZEBRA_NEIGH_ADDED;
else if (h->nlmsg_type == RTM_GETNEIGH)
cmd = ZEBRA_NEIGH_GET;
else if (h->nlmsg_type == RTM_DELNEIGH)
cmd = ZEBRA_NEIGH_REMOVED;
else {
- zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type);
+ zlog_debug("%s(): unknown nlmsg type %u", __func__,
+ h->nlmsg_type);
return 0;
}
if (tb[NDA_LLADDR]) {
if (RTA_PAYLOAD(tb[NDA_LLADDR]) != ETH_ALEN) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
- nl_msg_type_to_str(h->nlmsg_type),
- nl_family_to_str(ndm->ndm_family),
- ifp->name, ndm->ndm_ifindex,
- (unsigned long)
- RTA_PAYLOAD(tb[NDA_LLADDR]));
+ "%s family %s IF %s(%u) - LLADDR is not MAC, len %lu",
+ nl_msg_type_to_str(h->nlmsg_type),
+ nl_family_to_str(ndm->ndm_family),
+ ifp->name, ndm->ndm_ifindex,
+ (unsigned long)RTA_PAYLOAD(
+ tb[NDA_LLADDR]));
}
/* copy LLADDR information */
l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]);
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), l2_len);
}
- zsend_neighbor_notify(cmd, ifp, &ip,
- ndm->ndm_state, l2_len ?
- &mac : NULL, l2_len);
- if(h->nlmsg_type == RTM_GETNEIGH)
+ zsend_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
+ l2_len ? &mac : NULL, l2_len);
+ if (h->nlmsg_type == RTM_GETNEIGH)
return 0;
/* The neighbor is present on an SVI. From this, we locate the
@@ -3677,8 +3679,8 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
int len;
struct ndmsg *ndm;
- if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH ||
- h->nlmsg_type == RTM_GETNEIGH))
+ if (!(h->nlmsg_type == RTM_NEWNEIGH || h->nlmsg_type == RTM_DELNEIGH
+ || h->nlmsg_type == RTM_GETNEIGH))
return 0;
/* Length validity. */
@@ -3734,8 +3736,8 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
ip = dplane_ctx_neigh_get_ipaddr(ctx);
- if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL ||
- dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
+ if (dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_INSTALL
+ || dplane_ctx_get_op(ctx) == DPLANE_OP_NEIGH_IP_DELETE) {
link_ip = dplane_ctx_neigh_get_link_ip(ctx);
llalen = IPADDRSZ(link_ip);
link_ptr = (const void *)&(link_ip->ip.addr);
@@ -3786,19 +3788,18 @@ static ssize_t netlink_neigh_update_ctx(const struct zebra_dplane_ctx *ctx,
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
ipaddr2str(ip, buf, sizeof(buf)),
- link_ip ? "Link " : "MAC ", buf2,
- flags, state, ext ? "ext " : "", ext_flags);
+ link_ip ? "Link " : "MAC ", buf2, flags, state,
+ ext ? "ext " : "", ext_flags);
}
return netlink_neigh_update_msg_encode(
- ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST, flags, state,
- 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext, ext_flags, buf, buflen,
- zebra2proto(dplane_ctx_get_type(ctx)));
+ ctx, cmd, link_ptr, llalen, ip, true, family, RTN_UNICAST,
+ flags, state, 0 /*nhg*/, false /*nfy*/, 0 /*nfy_flags*/, ext,
+ ext_flags, buf, buflen, zebra2proto(dplane_ctx_get_type(ctx)));
}
-static int
-netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
- void *data, size_t datalen)
+static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
+ void *data, size_t datalen)
{
struct {
struct nlmsghdr n;
@@ -3821,24 +3822,22 @@ netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
req->n.nlmsg_type = RTM_SETNEIGHTBL;
req->ndtm.ndtm_family = family;
- nl_attr_put(&req->n, datalen, NDTA_NAME, family == AF_INET ? "arp_cache" :
- "ndisc_cache", 10);
+ nl_attr_put(&req->n, datalen, NDTA_NAME,
+ family == AF_INET ? "arp_cache" : "ndisc_cache", 10);
nest = nl_attr_nest(&req->n, datalen, NDTA_PARMS);
if (nest == NULL)
return 0;
- if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx,
- sizeof(idx)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_IFINDEX, &idx, sizeof(idx)))
return 0;
val = dplane_ctx_neightable_get_app_probes(ctx);
- if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val,
- sizeof(val)))
+ if (!nl_attr_put(&req->n, datalen, NDTPA_APP_PROBES, &val, sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_mcast_probes(ctx);
if (!nl_attr_put(&req->n, datalen, NDTPA_MCAST_PROBES, &val,
sizeof(val)))
return 0;
val = dplane_ctx_neightable_get_ucast_probes(ctx);
- if (!nl_attr_put(&req->n, datalen,NDTPA_UCAST_PROBES, &val,
+ if (!nl_attr_put(&req->n, datalen, NDTPA_UCAST_PROBES, &val,
sizeof(val)))
return 0;
nl_attr_nest_end(&req->n, nest);
@@ -3893,7 +3892,8 @@ enum netlink_msg_status netlink_put_mac_update_msg(struct nl_batch *bth,
enum netlink_msg_status
netlink_put_neigh_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
-{ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
+{
+ return netlink_batch_add_msg(bth, ctx, netlink_neigh_msg_encoder,
false);
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 27ed6b11d..5de8594c8 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -368,9 +368,9 @@ int kernel_neigh_register(vrf_id_t vrf_id, struct zserv *client, bool reg)
return 0;
}
-int kernel_neigh_update(int add, int ifindex, void *addr, char *lla,
- int llalen, ns_id_t ns_id, uint8_t family,
- bool permanent, uint8_t protocol)
+int kernel_neigh_update(int add, int ifindex, void *addr, char *lla, int llalen,
+ ns_id_t ns_id, uint8_t family, bool permanent,
+ uint8_t protocol)
{
/* TODO */
return 0;
@@ -395,8 +395,7 @@ enum zebra_dplane_result kernel_mac_update_ctx(struct zebra_dplane_ctx *ctx)
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}
-int kernel_configure_if_link(struct interface *ifp,
- struct interface *link_ifp,
+int kernel_configure_if_link(struct interface *ifp, struct interface *link_ifp,
ns_id_t ns_id)
{
return 0;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f009ea8a..cec2e5b96 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -952,11 +952,9 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable,
zserv_send_message(client, s);
}
-void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac, int macsize)
+void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state, void *mac,
+ int macsize)
{
struct stream *s;
struct listnode *node, *nnode;
@@ -964,8 +962,8 @@ void zsend_neighbor_notify(int cmd,
afi_t afi;
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("%s: Notifying Neighbor entry (%u)", __PRETTY_FUNCTION__,
- cmd);
+ zlog_debug("%s: Notifying Neighbor entry (%u)",
+ __PRETTY_FUNCTION__, cmd);
if (ipaddr->ipa_type == IPADDR_V4)
afi = AFI_IP;
@@ -983,12 +981,10 @@ void zsend_neighbor_notify(int cmd,
stream_putl(s, ifp->ifindex);
if (ipaddr->ipa_type == IPADDR_V4) {
stream_putw(s, AF_INET);
- stream_put(s, &ipaddr->ip._v4_addr,
- IPV4_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v4_addr, IPV4_MAX_BYTELEN);
} else if (ipaddr->ipa_type == IPADDR_V6) {
stream_putw(s, AF_INET6);
- stream_put(s, &ipaddr->ip._v6_addr,
- IPV6_MAX_BYTELEN);
+ stream_put(s, &ipaddr->ip._v6_addr, IPV6_MAX_BYTELEN);
} else
return;
stream_putl(s, ndm_state);
@@ -3196,8 +3192,7 @@ static int zebra_neigh_read_ip(struct stream *s, struct ipaddr *add)
uint8_t family;
STREAM_GETC(s, family);
- if (family != AF_INET &&
- family != AF_INET6)
+ if (family != AF_INET && family != AF_INET6)
return -1;
STREAM_GET(&add->ip.addr, s, family2addrsize(family));
@@ -3269,7 +3264,7 @@ static inline void zebra_configure_arp(ZAPI_HANDLER_ARGS)
if (fam != AF_INET && fam != AF_INET6)
return;
STREAM_GETL(s, idx);
- ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
+ ifp = if_lookup_by_index_per_ns(zvrf->zns, idx);
if (!ifp)
return;
dplane_neigh_table_update(ifp, fam, 1, 0, 0);
@@ -3313,11 +3308,10 @@ static inline void zebra_neigh_del(ZAPI_HANDLER_ARGS)
if (!ifp)
return;
dplane_neigh_ip_update(DPLANE_OP_NEIGH_IP_DELETE, ifp, &api.ip_out,
- &api.ip_in, true, client->proto);
+ &api.ip_in, true, client->proto);
}
-
static inline void zread_iptable(ZAPI_HANDLER_ARGS)
{
struct zebra_pbr_iptable *zpi =
diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h
index 48e211ca8..b2893280a 100644
--- a/zebra/zapi_msg.h
+++ b/zebra/zapi_msg.h
@@ -104,12 +104,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client,
extern int zsend_sr_policy_notify_status(uint32_t color,
struct ipaddr *endpoint, char *name,
int status);
-extern void zsend_neighbor_notify(int cmd,
- struct interface *ifp,
- struct ipaddr *ipaddr,
- int ndm_state,
- void *mac,
- int macsize);
+extern void zsend_neighbor_notify(int cmd, struct interface *ifp,
+ struct ipaddr *ipaddr, int ndm_state,
+ void *mac, int macsize);
extern int zsend_client_close_notify(struct zserv *client,
struct zserv *closed_client);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 743417168..e1c120e52 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -232,8 +232,7 @@ struct dplane_neigh_info {
/*
* Neighbor Table
*/
-struct dplane_neigh_table
-{
+struct dplane_neigh_table {
uint8_t family;
uint32_t app_probes;
uint32_t ucast_probes;
@@ -500,14 +499,11 @@ static enum zebra_dplane_result mac_update_common(
vlanid_t vid, const struct ethaddr *mac,
struct in_addr vtep_ip, bool sticky, uint32_t nhg_id,
uint32_t update_flags);
-static enum zebra_dplane_result neigh_update_internal(
- enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state, uint32_t update_flags,
- int protocol);
+static enum zebra_dplane_result
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol);
/*
* Public APIs
@@ -1689,8 +1685,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
return &(ctx->u.neigh.ip_addr);
}
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx)
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
return &(ctx->u.neigh.link.ip_addr);
@@ -1923,8 +1919,7 @@ uint32_t dplane_intf_extra_get_status(const struct dplane_intf_extra *ptr)
return ptr->status;
}
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx)
{
DPLANE_CTX_VALID(ctx);
@@ -3297,7 +3292,8 @@ enum zebra_dplane_result dplane_rem_mac_del(const struct interface *ifp,
*/
enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
const struct interface *ifp,
- struct ipaddr *link_ip, struct ipaddr *ip,
+ struct ipaddr *link_ip,
+ struct ipaddr *ip,
bool permanent, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
@@ -3312,11 +3308,11 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
dplane_op2str(op), ifp->name, buf1, buf2);
}
- if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
- if (!permanent)
- state = DPLANE_NUD_REACHABLE;
- else
- state = DPLANE_NUD_PERMANENT;
+ if (op == DPLANE_OP_NEIGH_IP_INSTALL) {
+ if (!permanent)
+ state = DPLANE_NUD_REACHABLE;
+ else
+ state = DPLANE_NUD_PERMANENT;
} else
state = DPLANE_NUD_FAILED;
@@ -3484,9 +3480,9 @@ enum zebra_dplane_result dplane_rem_neigh_add(const struct interface *ifp,
if (was_static)
update_flags |= DPLANE_NEIGH_WAS_STATIC;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
- (const void *)mac, AF_ETHERNET, ip,
- flags, DPLANE_NUD_NOARP, update_flags, 0);
+ result = neigh_update_internal(
+ DPLANE_OP_NEIGH_INSTALL, ifp, (const void *)mac, AF_ETHERNET,
+ ip, flags, DPLANE_NUD_NOARP, update_flags, 0);
return result;
}
@@ -3518,9 +3514,9 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp,
if (set_router)
ntf |= DPLANE_NTF_ROUTER;
- result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL,
- ifp, (const void *)mac, AF_ETHERNET,
- ip, ntf, state, update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_INSTALL, ifp,
+ (const void *)mac, AF_ETHERNET, ip, ntf,
+ state, update_flags, 0);
return result;
}
@@ -3536,9 +3532,8 @@ enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp,
update_flags |= DPLANE_NEIGH_REMOTE;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE,
- ifp, NULL, AF_ETHERNET, ip, 0, 0,
- update_flags, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DELETE, ifp, NULL,
+ AF_ETHERNET, ip, 0, 0, update_flags, 0);
return result;
}
@@ -3561,9 +3556,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_ADD,
- ifp, &mac, AF_ETHERNET, &addr,
- 0, 0, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_VTEP_ADD, ifp, &mac,
+ AF_ETHERNET, &addr, 0, 0, 0, 0);
return result;
}
@@ -3587,8 +3581,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp,
SET_IPADDR_V4(&addr);
addr.ipaddr_v4 = *ip;
- result = neigh_update_internal(DPLANE_OP_VTEP_DELETE,
- ifp, (const void *)&mac, AF_ETHERNET, &addr,
+ result = neigh_update_internal(DPLANE_OP_VTEP_DELETE, ifp,
+ (const void *)&mac, AF_ETHERNET, &addr,
0, 0, 0, 0);
return result;
@@ -3599,8 +3593,9 @@ enum zebra_dplane_result dplane_neigh_discover(const struct interface *ifp,
{
enum zebra_dplane_result result;
- result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL, AF_ETHERNET,
- ip, DPLANE_NTF_USE, DPLANE_NUD_INCOMPLETE, 0, 0);
+ result = neigh_update_internal(DPLANE_OP_NEIGH_DISCOVER, ifp, NULL,
+ AF_ETHERNET, ip, DPLANE_NTF_USE,
+ DPLANE_NUD_INCOMPLETE, 0, 0);
return result;
}
@@ -3659,21 +3654,16 @@ enum zebra_dplane_result dplane_neigh_table_update(const struct interface *ifp,
}
return result;
-
}
/*
* Common helper api for neighbor updates
*/
static enum zebra_dplane_result
-neigh_update_internal(enum dplane_op_e op,
- const struct interface *ifp,
- const void *link,
- const int link_family,
- const struct ipaddr *ip,
- uint32_t flags, uint16_t state,
- uint32_t update_flags,
- int protocol)
+neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
+ const void *link, const int link_family,
+ const struct ipaddr *ip, uint32_t flags, uint16_t state,
+ uint32_t update_flags, int protocol)
{
enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
int ret;
@@ -3697,8 +3687,8 @@ neigh_update_internal(enum dplane_op_e op,
ipaddr2str(ip, buf2, sizeof(buf2));
zlog_debug("init neigh ctx %s: ifp %s, %s %s, ip %s",
dplane_op2str(op), ifp->name,
- link_family == AF_ETHERNET ? "mac " : "link ",
- buf1, buf2);
+ link_family == AF_ETHERNET ? "mac " : "link ", buf1,
+ buf2);
}
ctx = dplane_ctx_alloc();
@@ -3883,8 +3873,8 @@ int dplane_show_helper(struct vty *vty, bool detailed)
memory_order_relaxed);
errs = atomic_load_explicit(&zdplane_info.dg_neightable_errors,
memory_order_relaxed);
- vty_out(vty, "Neighbor Table updates: %"PRIu64"\n", incoming);
- vty_out(vty, "Neighbor Table errors: %"PRIu64"\n", errs);
+ vty_out(vty, "Neighbor Table updates: %" PRIu64 "\n", incoming);
+ vty_out(vty, "Neighbor Table errors: %" PRIu64 "\n", errs);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index daee6dd30..cfa0fdcb2 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -180,8 +180,8 @@ enum dplane_op_e {
#define DPLANE_NUD_NOARP 0x04
#define DPLANE_NUD_PROBE 0x08
#define DPLANE_NUD_INCOMPLETE 0x10
-#define DPLANE_NUD_PERMANENT 0x20
-#define DPLANE_NUD_FAILED 0x40
+#define DPLANE_NUD_PERMANENT 0x20
+#define DPLANE_NUD_FAILED 0x40
/* MAC update flags - dplane_mac_info.update_flags */
#define DPLANE_MAC_REMOTE (1 << 0)
@@ -457,8 +457,8 @@ const struct ipaddr *dplane_ctx_neigh_get_ipaddr(
const struct zebra_dplane_ctx *ctx);
const struct ethaddr *dplane_ctx_neigh_get_mac(
const struct zebra_dplane_ctx *ctx);
-const struct ipaddr *dplane_ctx_neigh_get_link_ip(
- const struct zebra_dplane_ctx *ctx);
+const struct ipaddr *
+dplane_ctx_neigh_get_link_ip(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_flags(const struct zebra_dplane_ctx *ctx);
uint16_t dplane_ctx_neigh_get_state(const struct zebra_dplane_ctx *ctx);
uint32_t dplane_ctx_neigh_get_update_flags(const struct zebra_dplane_ctx *ctx);
@@ -497,8 +497,7 @@ uint32_t
dplane_ctx_get_br_port_backup_nhg_id(const struct zebra_dplane_ctx *ctx);
/* Accessors for neighbor table information */
-uint8_t
-dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_neightable_get_family(const struct zebra_dplane_ctx *ctx);
uint32_t
dplane_ctx_neightable_get_app_probes(const struct zebra_dplane_ctx *ctx);
uint32_t
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
in order to apply a memset to a non initialised structure, use CALLOC instead of MALLOC Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This patch implements new zapi api to get neighbor information that zebra knows and that other daemons may need to know. Actually, nhrp daemons is interested in getting the neighbor information on gre interfaces, and the API will be used for that. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra implements zebra api for configuring link layer information. that can be an arp entry (for ipv4) or ipv6 neighbor discovery entry. This can also be an ipv4/ipv6 entry associated to an underlay ipv4 address, as it is used in gre point to multipoint interfaces. this api will also be used as monitoring. an hash list is instantiated into zebra (this is the vrf bitmap). each client interested in those entries in a specific vrf, will listen for following messages: entries added, removed, or who-has messages. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
neighbor notifications are done in zebra. so, instead of relying on nhrp, rely on zebra by using zebra api interface. Consequently, the code originally used in nhrp for netlink neighor notification is no more used. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
a zebra api is extended to offer ability to add or remove neighbor entry from daemon. Also this extension makes possible to add neigh entry, not only between IPs and macs, but also between IPs and NBMA IPs. This API supports configuring ipv6/ipv4 entries with ipv4/ipv6 lladdr. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
this api is needed for nhrp. the goal is to implement it in zebra, while other daemon will used it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
When netlink_neigh_update() is called, the link registration was failing, due to bad request length. Also, the query was failing if NDA_DST was an ipv6 address. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
neighbor table api in zebra is added. a netlink api is created for that. the handler is called from the api defined in the previous commit. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
EVPN neighbor operations were already done in the zebra dataplane framework. Now that NHRP is able to use zebra to perform neighbor IP operations (by programming link IP operations), handle this operation under dataplane framework: - assign two new operations NEIGH_IP_INSTALL and NEIGH_IP_DELETE; this is reserved for GRE like interfaces: example: ip neigh add A.B.C.D lladdr E.F.G.H - use 'struct ipaddr' to store and encode the link ip address - reuse dplane_neigh_info, and create an union with mac address - reuse the protocol type and use it for neighbor operations; this permits to store the daemon originating this neighbor operation. a new route type is created: ZEBRA_ROUTE_NEIGH. - the netlink level functions will handle a pointer, and a type; the type indicates the family of the pointer: AF_INET or AF_INET6 if the link type is an ip address, mac address otherwise. - to keep backward compatibility with old queries, as no extension was done, an option NEIGH_NO_EXTENSION has been put in place - also, 2 new state flags are used: NUD_PERMANENT and NUD_FAILED. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Instead of directly configuring the neighbor table after read from zapi interface, a zebra dplane context is prepared to host the interface and the family where the neighbor table is updated. Also, some other fields are hosted: app_probes, ucast_probes, and mcast_probes. More information on those fields can be found on ip-ntable configuration. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This test establishes a binding between nbma ip of a spoke and its protocol address. This information is pushed to hub. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
11f63bd
to
47711d4
Compare
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-18289/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
neighbor table per interface is being configured per interface, via zebra api. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
avoid crashing when terminating interface contexts. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
47711d4
to
857251b
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-18350/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
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.
Still see a few style warnings that should be cleaned up?
nhrpd/netlink_arp.c
Outdated
: ZEBRA_NEIGH_STATE_FAILED; | ||
nhrp_cache_set_used(c, state == ZEBRA_NEIGH_STATE_REACHABLE); | ||
} | ||
return; |
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.
style warning?
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, I removed the return; line.
nhrpd/netlink_arp.c
Outdated
} | ||
sockunion_family(&lladdr) = api.ip_out.ipa_type; | ||
if (api.ip_out.ipa_type != AF_UNSPEC) | ||
memcpy((uint8_t *)sockunion_get_addr(&lladdr), &api.ip_out.ip.addr, |
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.
style warning?
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.
this line was above 80 byte column. I fixed it.
zebra/rt_netlink.c
Outdated
|
||
if (l2_len) { | ||
sockunion_family(&link_layer_ipv4) = AF_INET; | ||
memcpy((void *)sockunion_get_addr(&link_layer_ipv4), &mac, l2_len); |
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.
style warning
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.
same match. line too long. I fixed it.
zebra/zapi_msg.c
Outdated
|
||
sockunion_family(&ip) = ipaddr_family(ipaddr); | ||
afi = family2afi(sockunion_family(&ip)); | ||
memcpy((char*)sockunion_get_addr(&ip), &ipaddr->ip.addr, |
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.
style warning?
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.
'char*' should become 'char *'. fixed it.
zebra/zebra_dplane.h
Outdated
const struct interface *ifp, | ||
struct ipaddr *link_ip, | ||
struct ipaddr *ip, | ||
uint32_t ndm_state, int protocol); |
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.
style warning
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.
line too long. I fixed it.
zapi_nbr structure is renamed to zapi_neigh_ip. Initially used to set a neighbor ip entry for gre interfaces, this structure is used to get events from the zebra layer to nhrp layer. The ndm state has been added, as it is needed on both sides. The zebra dplane layer is slightly modified. Also, to clarify what ZEBRA_NEIGH_ADD/DEL means, a rename is done: it is called now ZEBRA_NEIGH_IP_ADD/DEL, and it signified that this zapi interface permits to set link operations by associating ip addresses to link addresses. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
this typedef was useless. remote it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
do not add a new route type, and consider 0 as a value meaning that zebra should be the owner. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
857251b
to
8821709
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-18361/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
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 good now
partially move some configuration items to use zapi interface.