diff options
author | 2016-12-02 10:07:47 +0000 | |
---|---|---|
committer | 2016-12-02 10:07:47 +0000 | |
commit | 5c83a035a5ec7cc43ea3265756177590c2867b37 (patch) | |
tree | c3cb9ec52328d30beda4dfdabbd06737ec50c342 /sys | |
parent | Few consistency fixes (no intended change in behaviour). (diff) | |
download | wireguard-openbsd-5c83a035a5ec7cc43ea3265756177590c2867b37.tar.xz wireguard-openbsd-5c83a035a5ec7cc43ea3265756177590c2867b37.zip |
Fix flow-removed OFP header xid value: use htonl() instead of htons() for
32bit integers.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/switchofp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/switchofp.c b/sys/net/switchofp.c index 752c6f40688..f1aff0b52ca 100644 --- a/sys/net/switchofp.c +++ b/sys/net/switchofp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: switchofp.c,v 1.40 2016/11/30 19:58:29 rzalamena Exp $ */ +/* $OpenBSD: switchofp.c,v 1.41 2016/12/02 10:07:47 rzalamena Exp $ */ /* * Copyright (c) 2016 Kazuya GODA <goda@openbsd.org> @@ -4733,7 +4733,7 @@ swofp_send_flow_removed(struct switch_softc *sc, struct swofp_flow_entry *swfe, ofr->fr_oh.oh_version = OFP_V_1_3; ofr->fr_oh.oh_type = OFP_T_FLOW_REMOVED; - ofr->fr_oh.oh_xid = htons(sc->sc_ofs->swofs_xidnxt++); + ofr->fr_oh.oh_xid = htonl(sc->sc_ofs->swofs_xidnxt++); ofr->fr_cookie = htobe64(swfe->swfe_cookie); ofr->fr_priority = htons(swfe->swfe_priority); |