On Fri, Apr 20, 2018 at 10:18:34AM -0700, Ayaka Koshibe wrote:
> Hi,
>
> switchd(8) sends packet_outs with OFP_PORT_ANY as the dstport, causing
> switches receiving them to disconnect due to validation failure of the said
> message. The comments indicate that looping packets should be ignored, which I
> agree is the expected behavior for a controller implementing a learning
> switch.
>
> This diff stops switchd(8) from processing packet_ins from looping packets,
> causing them to be dropped as the comment suggests.
>
> OK?
>
>
> Thanks,
> Ayaka
>
ping
>
> Index: ofp13.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/switchd/ofp13.c,v
> retrieving revision 1.43
> diff -u -p -u -r1.43 ofp13.c
> --- ofp13.c 17 Jan 2017 09:21:50 -0000 1.43
> +++ ofp13.c 18 Apr 2018 07:43:35 -0000
> @@ -1082,7 +1082,8 @@ ofp13_packet_in(struct switchd *sc, stru
> * silently drop looping packet
> * (don't use OFP_PORT_INPUT here)
> */
> - dstport = OFP_PORT_ANY;
> + ret = 0;
> + goto done;
> } else {
> addflow = 1;
> }