summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorHiroki Shirokura <slank.dev@gmail.com>2021-02-24 10:47:05 +0000
committerMark Stapp <mjs@voltanet.io>2021-06-02 10:24:48 -0400
commit4df9d8592b1631e6cb50e291cab1ff7486467a3d (patch)
treeb9a5a34549e37434b4be3c9657ab55b17b21d095 /zebra/rt_netlink.c
parentc5a044e0551fc607fdfe950ddefcc351d8a4f15d (diff)
*: fix code format accourding to checkpatch
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 705a035de5..f5ce4e795b 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -474,7 +474,7 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb,
mpls_label_t labels[MPLS_MAX_LABELS] = {0};
int num_labels = 0;
enum seg6local_action_t seg6l_act = SEG6_LOCAL_ACTION_UNSPEC;
- struct seg6local_context seg6l_ctx = {{0}};
+ struct seg6local_context seg6l_ctx = { {0} };
struct in6_addr seg6_segs = {0};
int num_segs = 0;
@@ -556,7 +556,7 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id,
mpls_label_t labels[MPLS_MAX_LABELS] = {0};
int num_labels = 0;
enum seg6local_action_t seg6l_act = SEG6_LOCAL_ACTION_UNSPEC;
- struct seg6local_context seg6l_ctx = {{0}};
+ struct seg6local_context seg6l_ctx = { {0} };
struct in6_addr seg6_segs = {0};
int num_segs = 0;
struct rtattr *rtnh_tb[RTA_MAX + 1] = {};
@@ -1336,6 +1336,7 @@ static size_t fill_seg6ipt_encap(char *buffer, size_t buflen,
struct seg6_iptunnel_encap *ipt;
struct ipv6_sr_hdr *srh;
const size_t srhlen = 24;
+
memset(buffer, 0, buflen);
ipt = (struct seg6_iptunnel_encap *)buffer;
@@ -2479,16 +2480,16 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd,
break;
case SEG6_LOCAL_ACTION_END_DX4:
nl_attr_put32(&req->n, buflen,
- SEG6_LOCAL_ACTION,
- SEG6_LOCAL_ACTION_END_DX4);
+ SEG6_LOCAL_ACTION,
+ SEG6_LOCAL_ACTION_END_DX4);
nl_attr_put(&req->n, buflen,
SEG6_LOCAL_NH4, &ctx->nh4,
sizeof(struct in_addr));
break;
case SEG6_LOCAL_ACTION_END_DT6:
nl_attr_put32(&req->n, buflen,
- SEG6_LOCAL_ACTION,
- SEG6_LOCAL_ACTION_END_DT6);
+ SEG6_LOCAL_ACTION,
+ SEG6_LOCAL_ACTION_END_DT6);
nl_attr_put32(&req->n, buflen,
SEG6_LOCAL_TABLE,
ctx->table);