summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2007-05-30 05:11:53 +0000
committerreyk <reyk@openbsd.org>2007-05-30 05:11:53 +0000
commitce6c39e9c53f17ed4a7d3f25bbe65df406141bca (patch)
tree6643e333df8648c0abf0583bdac53f6e4e4dc3cb
parentno need to declare extern ipsec_in_use, we get it via ip_ipsp.h (diff)
downloadwireguard-openbsd-ce6c39e9c53f17ed4a7d3f25bbe65df406141bca.tar.xz
wireguard-openbsd-ce6c39e9c53f17ed4a7d3f25bbe65df406141bca.zip
fix the ether_aton-like function to print the correct lladdr (swap bytes)
ok claudio@
-rw-r--r--sys/dev/pci/if_che.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_che.c b/sys/dev/pci/if_che.c
index a5ab55848da..4f3ed02d3ac 100644
--- a/sys/dev/pci/if_che.c
+++ b/sys/dev/pci/if_che.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_che.c,v 1.7 2007/05/28 16:26:23 claudio Exp $ */
+/* $OpenBSD: if_che.c,v 1.8 2007/05/30 05:11:53 reyk Exp $ */
/*
* Copyright (c) 2007 Claudio Jeker <claudio@openbsd.org>
@@ -625,7 +625,7 @@ che_conv_lladdr(char *mac, u_int8_t *lladdr)
else if (mac[i] >= 'a' && mac[i] <= 'f')
digit = mac[i] - 'a' + 10;
- if (i & 1)
+ if ((i & 1) == 0)
digit <<= 4;
lladdr[i/2] |= digit;