diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-01 01:39:05 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-01 01:39:05 +0000 |
commit | 6ac6d98dd11b9b67f5f1c2902e8a3d49585f3c5d (patch) | |
tree | c596897cbde39504927afc71f8aebe5f8191f230 /usr.sbin | |
parent | b9c01f34a32422d2c2334dbaad81f342f3d2f81c (diff) |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpd/packet.c | 5 |
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))); } |