summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2009-01-29 20:15:50 +0000
committerstsp <stsp@openbsd.org>2009-01-29 20:15:50 +0000
commitac2c9ecf908012390eecc29992f948b6336be82a (patch)
tree58ed93c5fe3f1be979007083bcadcb31d66328b5
parentOne more step on the long road of beautifying ospf6ctl output: (diff)
downloadwireguard-openbsd-ac2c9ecf908012390eecc29992f948b6336be82a.tar.xz
wireguard-openbsd-ac2c9ecf908012390eecc29992f948b6336be82a.zip
Correctly byte-swap the link state ID when building Intra-Area-Prefix
LSAs which refer to Router LSAs. ok claudio@
-rw-r--r--usr.sbin/ospf6d/ospfe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/ospfe.c b/usr.sbin/ospf6d/ospfe.c
index 93f949f4828..271eb7e9e7a 100644
--- a/usr.sbin/ospf6d/ospfe.c
+++ b/usr.sbin/ospf6d/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.19 2009/01/29 19:07:53 stsp Exp $ */
+/* $OpenBSD: ospfe.c,v 1.20 2009/01/29 20:15:50 stsp Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -1141,7 +1141,7 @@ orig_intra_lsa_rtr(struct iface *iface_arg)
/* LSA header */
lsa_hdr.age = htons(DEFAULT_AGE);
lsa_hdr.type = htons(LSA_TYPE_INTRA_A_PREFIX);
- lsa_hdr.ls_id = 1; /* TODO: fragmentation */
+ lsa_hdr.ls_id = htonl(1); /* TODO: fragmentation */
lsa_hdr.adv_rtr = oeconf->rtr_id.s_addr;
lsa_hdr.seq_num = htonl(INIT_SEQ_NUM);
lsa_hdr.len = htons(buf->wpos);