diff options
author | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2016-10-08 20:36:36 +0000 |
---|---|---|
committer | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2016-10-08 20:36:36 +0000 |
commit | 8bc8e06f1a20d7b769734b8c49b5b8baf044ec78 (patch) | |
tree | baa71af408d1ccdcdc2fb83c8d534392888e946b /sys/net | |
parent | e32bbf041c1f1cd91bf7016119cbabe9b680deb5 (diff) |
Check for the correct header length size. MINCLSIZE is used for cluster,
instead we should use MHLEN for header size.
ok mikeb@
Diffstat (limited to 'sys/net')
-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 c0111052354..fe1a3601f85 100644 --- a/sys/net/switchofp.c +++ b/sys/net/switchofp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: switchofp.c,v 1.10 2016/10/04 17:58:09 rzalamena Exp $ */ +/* $OpenBSD: switchofp.c,v 1.11 2016/10/08 20:36:35 rzalamena Exp $ */ /* * Copyright (c) 2016 Kazuya GODA <goda@openbsd.org> @@ -4510,7 +4510,7 @@ swofp_send_flow_removed(struct switch_softc *sc, struct swofp_flow_entry *swfe, MGETHDR(m, M_WAITOK, MT_DATA); if (m == NULL) return (ENOBUFS); - if ((sizeof(*ofr) + match_len) >= MINCLSIZE) { + if ((sizeof(*ofr) + match_len) >= MHLEN) { MCLGET(m, M_WAITOK); if (m == NULL) return (ENOBUFS); |