diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-03 22:39:57 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-04 20:12:46 +0100 |
commit | 67188ca253015c9a9c8ac14b099878305cea4c7d (patch) | |
tree | 4e6ac9e29d12abebe99be9fb5e514aad1e5189ed /zebra/kernel_netlink.c | |
parent | Merge pull request #5604 from qlyoung/add-ubsan-option (diff) | |
download | frr-67188ca253015c9a9c8ac14b099878305cea4c7d.tar.xz frr-67188ca253015c9a9c8ac14b099878305cea4c7d.zip |
zebra: fix undefined bitshifts in netlink stuff
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/kernel_netlink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 23f1a3bf8..3bceb5635 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -1086,7 +1086,7 @@ int netlink_request(struct nlsock *nl, struct nlmsghdr *n) netlink_socket (). */ void kernel_init(struct zebra_ns *zns) { - unsigned long groups; + uint32_t groups; #if defined SOL_NETLINK int one, ret; #endif @@ -1107,9 +1107,9 @@ void kernel_init(struct zebra_ns *zns) RTMGRP_IPV6_IFADDR | RTMGRP_IPV4_MROUTE | RTMGRP_NEIGH | - (1 << (RTNLGRP_IPV4_RULE - 1)) | - (1 << (RTNLGRP_IPV6_RULE - 1)) | - (1 << (RTNLGRP_NEXTHOP - 1)); + ((uint32_t) 1 << (RTNLGRP_IPV4_RULE - 1)) | + ((uint32_t) 1 << (RTNLGRP_IPV6_RULE - 1)) | + ((uint32_t) 1 << (RTNLGRP_NEXTHOP - 1)); snprintf(zns->netlink.name, sizeof(zns->netlink.name), "netlink-listen (NS %u)", zns->ns_id); |