From: Benjamin Cama Date: Sat, 20 Aug 2011 16:25:44 +0000 (+0200) Subject: Merge branch 'use-netlink' into fdn-mods X-Git-Tag: debian/2.2.1-1fdn2~1^2~2 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/0f85bdecaba4806c0f06ee89d7ec084cc015bb19?hp=7d4d3c7bcaea62121eaa60dce83c6d8209328838 Merge branch 'use-netlink' into fdn-mods --- diff --git a/l2tpns.c b/l2tpns.c index 9576137..ae7f3f4 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -446,7 +446,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; @@ -521,7 +525,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;