summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2021-03-23 13:22:53 +0100
committerLuc Provoost <luc.provoost@intel.com>2021-03-25 15:44:11 +0100
commit91c54d4d46d64cbba9d5573609497a211dbbc479 (patch)
treefee8be32db9aaf52902fe169df03aff56cd5df76 /VNFs/DPPD-PROX
parent6cc79cf61cd3375b3e12956bb9ec3284a8e7440f (diff)
Do not request IPV6 routing info
PROX is not yet dealing with IPV6 routing info (only IPV4). Hence we got a segmentation fault when receiving such information. In a previous commit, we are checking for IPV4 routing info and we do not continue processing of any other routing information. With this fix, we ask the Linux OS NOT to provide IPV6 routing info. The checks when receiving routing information have changed so that we only treat IPV4 and nothing else. Change-Id: I428a036c31014377c8de08da17e51740be0e1de5 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/handle_master.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/VNFs/DPPD-PROX/handle_master.c b/VNFs/DPPD-PROX/handle_master.c
index 606b76f..8f80ed8 100644
--- a/VNFs/DPPD-PROX/handle_master.c
+++ b/VNFs/DPPD-PROX/handle_master.c
@@ -969,7 +969,7 @@ void init_ctrl_plane(struct task_base *tbase)
struct sockaddr_nl sockaddr2;
memset(&sockaddr2, 0, sizeof(struct sockaddr_nl));
sockaddr2.nl_family = AF_NETLINK;
- sockaddr2.nl_groups = RTMGRP_IPV6_ROUTE | RTMGRP_IPV4_ROUTE | RTMGRP_NOTIFY;
+ sockaddr2.nl_groups = RTMGRP_IPV4_ROUTE | RTMGRP_NOTIFY;
rc = bind(fd, (struct sockaddr *)&sockaddr2, sizeof(struct sockaddr_nl));
PROX_PANIC(rc < 0, "Failed to bind to RTMGRP_NEIGH netlink group\n");
task->route_fds.fd = fd;
@@ -1012,12 +1012,12 @@ static void handle_route_event(struct task_base *tbase)
struct rtmsg *rtmsg = (struct rtmsg *)NLMSG_DATA(nl_hdr);
int rtm_family = rtmsg->rtm_family;
- if ((rtm_family == AF_INET) && (rtmsg->rtm_table != RT_TABLE_MAIN) &&(rtmsg->rtm_table != RT_TABLE_LOCAL))
- return;
- if (rtm_family == AF_INET6) {
- plog_warn("Unhandled IPV6 routing message\n");
+ if (rtm_family != AF_INET) {
+ plog_warn("Unhandled non IPV4 routing message\n");
return;
}
+ if ((rtmsg->rtm_table != RT_TABLE_MAIN) && (rtmsg->rtm_table != RT_TABLE_LOCAL))
+ return;
int dst_len = rtmsg->rtm_dst_len;
struct rtattr *rta = (struct rtattr *)RTM_RTA(rtmsg);