The pkt_buf variable is never set in incoming packet_in messages and this
diff fixes it.

ok?


Index: packet.c
===================================================================
RCS file: /home/obsdcvs/src/usr.sbin/switchd/packet.c,v
retrieving revision 1.3
diff -u -p -r1.3 packet.c
--- packet.c    21 Jul 2016 08:39:23 -0000      1.3
+++ packet.c    21 Sep 2016 11:33:44 -0000
@@ -63,7 +63,7 @@ packet_input(struct switchd *sc, struct 
                return (-1);
 
        pkt->pkt_len = ibuf_dataleft(ibuf);
-       if ((pkt->pkt_eh = eh = ibuf_getdata(ibuf, sizeof(*eh))) == NULL) {
+       if ((eh = ibuf_getdata(ibuf, sizeof(*eh))) == NULL) {
                log_debug("short packet");
                return (-1);
        }
@@ -86,6 +86,9 @@ packet_input(struct switchd *sc, struct 
 
        if (dstport)
                *dstport = dst == NULL ? OFP_PORT_ANY : dst->mac_port;
+
+       pkt->pkt_eh = eh;
+       pkt->pkt_buf = (uint8_t *) eh;
 
        return (0);
 }

Reply via email to