<p dir="ltr">Based on the commit message it isn't clear to me why we shouldn't cover ARP here. (I don't have easy access to the full source code at the moment, so maybe this implies a source code revision and maybe a commit message revision and maybe I just misunderstand.)</p>
<div class="gmail_quote">On Feb 21, 2013 8:50 PM, "Justin Pettit" <<a href="mailto:jpettit@nicira.com">jpettit@nicira.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When printing a match, we would print "tp_src" and "tp_dst" if the<br>
packet wasn't ICMPv4 or ICMPv6. Unfortunately, this doesn't cover ARP.<br>
This changes the check to only print those keys if the network protocol<br>
is TCP or UDP.<br>
<br>
Signed-off-by: Justin Pettit <<a href="mailto:jpettit@nicira.com">jpettit@nicira.com</a>><br>
---<br>
lib/match.c | 3 ++-<br>
1 files changed, 2 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/lib/match.c b/lib/match.c<br>
index f4b0a6c..2395fb4 100644<br>
--- a/lib/match.c<br>
+++ b/lib/match.c<br>
@@ -1053,7 +1053,8 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)<br>
&wc->masks.nd_target);<br>
format_eth_masked(s, "nd_sll", f->arp_sha, wc->masks.arp_sha);<br>
format_eth_masked(s, "nd_tll", f->arp_tha, wc->masks.arp_tha);<br>
- } else {<br>
+ } else if (f->nw_proto == IPPROTO_TCP ||<br>
+ f->nw_proto == IPPROTO_UDP) {<br>
format_be16_masked(s, "tp_src", f->tp_src, wc->masks.tp_src);<br>
format_be16_masked(s, "tp_dst", f->tp_dst, wc->masks.tp_dst);<br>
}<br>
--<br>
1.7.5.4<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
<a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</blockquote></div>