summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-09-07 13:25:36 +0000
committerclaudio <claudio@openbsd.org>2018-09-07 13:25:36 +0000
commit9e173f29856112c8d5236c88e8e25d71ec75c123 (patch)
treedd80129bc3ce6ba23e7eaed38cdbb6ca94c87b35
parentremove some unused variables and otherwise tidy up a bit. (diff)
downloadwireguard-openbsd-9e173f29856112c8d5236c88e8e25d71ec75c123.tar.xz
wireguard-openbsd-9e173f29856112c8d5236c88e8e25d71ec75c123.zip
Add missing htonl() else matching does not really work.
-rw-r--r--usr.sbin/bgpd/rde_trie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_trie.c b/usr.sbin/bgpd/rde_trie.c
index 781aa778863..fb541f90fd1 100644
--- a/usr.sbin/bgpd/rde_trie.c
+++ b/usr.sbin/bgpd/rde_trie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_trie.c,v 1.1 2018/09/07 10:49:22 claudio Exp $ */
+/* $OpenBSD: rde_trie.c,v 1.2 2018/09/07 13:25:36 claudio Exp $ */
/*
* Copyright (c) 2018 Claudio Jeker <claudio@openbsd.org>
@@ -134,7 +134,7 @@ static void
inet4setbit(struct in_addr *addr, u_int8_t bit)
{
/* bit 0 sets the MSB and 31 sets the LSB */
- addr->s_addr |= (1 << (31 - bit));
+ addr->s_addr |= htonl(1 << (31 - bit));
}
static void