From: claudio Date: Fri, 7 Sep 2018 13:25:36 +0000 (+0000) Subject: Add missing htonl() else matching does not really work. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9e173f29856112c8d5236c88e8e25d71ec75c123;p=openbsd Add missing htonl() else matching does not really work. --- 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