From: Benjamin Cama Date: Sat, 20 Aug 2011 16:23:58 +0000 (+0200) Subject: Correctly form the delete route/route6 request. X-Git-Tag: debian/2.2.1-1fdn2~1^2~2^2 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/c23b9c14abdbb0fa3c5d94fa137ac38e3b13a71a?ds=sidebyside;hp=--cc Correctly form the delete route/route6 request. Signed-off-by: Benjamin Cama --- c23b9c14abdbb0fa3c5d94fa137ac38e3b13a71a diff --git a/l2tpns.c b/l2tpns.c index 5545aed..bab453f 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -444,7 +444,11 @@ static void routeset(sessionidt s, in_addr_t ip, int prefixlen, in_addr_t gw, in req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; } else + { req.nh.nlmsg_type = RTM_DELROUTE; + req.nh.nlmsg_flags = NLM_F_REQUEST; + } + req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.rt)); req.rt.rtm_family = AF_INET; @@ -519,7 +523,11 @@ void route6set(sessionidt s, struct in6_addr ip, int prefixlen, int add) req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; } else + { req.nh.nlmsg_type = RTM_DELROUTE; + req.nh.nlmsg_flags = NLM_F_REQUEST; + } + req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.rt)); req.rt.rtm_family = AF_INET6;