summaryrefslogtreecommitdiff
path: root/sysdep/linux
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-06-03 11:58:46 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2015-06-08 02:24:08 +0200
commit78a2cc289fbe11d5b5783220e2cc61d119a78ec3 (patch)
tree65ccc2acc15f1ca2da2041ac0fc7a858587a2a31 /sysdep/linux
parentd217ba5111a80a629e408961b902d7759c4b46f5 (diff)
KRT: Fixes some minor bugs in kernel protocol
Diffstat (limited to 'sysdep/linux')
-rw-r--r--sysdep/linux/netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index c4d52255..9f206e1c 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -703,6 +703,11 @@ nl_send_route(struct krt_proto *p, rte *e, struct ea_list *eattrs, int new)
r.r.rtm_scope = RT_SCOPE_UNIVERSE;
nl_add_attr_ipa(&r.h, sizeof(r), RTA_DST, net->n.prefix);
+ /* For route delete, we do not specify route attributes */
+ if (!new)
+ return nl_exchange(&r.h);
+
+
if (ea = ea_find(eattrs, EA_KRT_METRIC))
nl_add_attr_u32(&r.h, sizeof(r), RTA_PRIORITY, ea->u.data);