From 9e173f29856112c8d5236c88e8e25d71ec75c123 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 7 Sep 2018 13:25:36 +0000 Subject: [PATCH] Add missing htonl() else matching does not really work. --- usr.sbin/bgpd/rde_trie.c | 4 ++-- 1 file 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 @@ -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 -- 2.20.1