summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2013-06-01 01:39:04 +0000
committerclaudio <claudio@openbsd.org>2013-06-01 01:39:04 +0000
commit64a5440f0e18885ba3cbaea6307a8f2c24a77695 (patch)
tree7233de166143708f1d188c2dd080d5fc5f81e11a
parentAlways advertise the Router-ID as the transport address. (diff)
downloadwireguard-openbsd-64a5440f0e18885ba3cbaea6307a8f2c24a77695.tar.xz
wireguard-openbsd-64a5440f0e18885ba3cbaea6307a8f2c24a77695.zip
Don't set the Message ID for hello messages.
The Message ID field is used by notification messages to identify a given message. This is the behavior adopted by Cisco IOS. Diff from Renato Westphal
-rw-r--r--usr.sbin/ldpd/packet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index aa63fbf690b..a9b9be8b8a0 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.18 2013/05/30 15:49:33 claudio Exp $ */
+/* $OpenBSD: packet.c,v 1.19 2013/06/01 01:39:04 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -76,7 +76,8 @@ gen_msg_tlv(struct ibuf *buf, u_int32_t type, u_int16_t size)
bzero(&msg, sizeof(msg));
msg.type = htons(type);
msg.length = htons(size);
- msg.msgid = htonl(++msgcnt);
+ if (type != MSG_TYPE_HELLO)
+ msg.msgid = htonl(++msgcnt);
return (ibuf_add(buf, &msg, sizeof(msg)));
}