summaryrefslogtreecommitdiff
path: root/usr.sbin/switchd/ofp13.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2016-11-18 13:05:13 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2016-11-18 13:05:13 +0000
commit7239eef602d9c46c2fe018d6429be8b3ffda38a3 (patch)
treef26320d24ed687fbdaf22f1db47b931c75e2ff78 /usr.sbin/switchd/ofp13.c
parentb12551ce74d2c371cf8a3b78435fb203bc9b2664 (diff)
Fix the flowmod header to send the correct command and buffer id.
OK rzalamena@
Diffstat (limited to 'usr.sbin/switchd/ofp13.c')
-rw-r--r--usr.sbin/switchd/ofp13.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/switchd/ofp13.c b/usr.sbin/switchd/ofp13.c
index b443e3f2335..3dd422ecf74 100644
--- a/usr.sbin/switchd/ofp13.c
+++ b/usr.sbin/switchd/ofp13.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofp13.c,v 1.29 2016/11/17 16:24:00 rzalamena Exp $ */
+/* $OpenBSD: ofp13.c,v 1.30 2016/11/18 13:05:12 reyk Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
@@ -1917,8 +1917,14 @@ ofp13_flowmod(struct switch_connection *con, struct ibuf *ibuf,
fm->fm_oh.oh_type = OFP_T_FLOW_MOD;
fm->fm_oh.oh_length = htons(sizeof(*fm));
fm->fm_oh.oh_xid = htonl(con->con_xidnxt++);
+
+ fm->fm_command = cmd;
+ fm->fm_buffer_id = htonl(OFP_PKTOUT_NO_BUFFER);
+ fm->fm_flags = htons(OFP_FLOWFLAG_SEND_FLOW_REMOVED);
+
fm->fm_match.om_type = htons(OFP_MATCH_OXM);
fm->fm_match.om_length = htons(sizeof(fm->fm_match));
+
return (fm);
}