Committed by
Gerrit Code Review
Bugfix: matching IP address without ethType will result in OFPT_ERROR_MSG (type=…
…OFPET_BAD_MATCH, code=OFPBMC_BAD_PREREQ) Change-Id: I4edc82cdc920b7c92048119c61b70bbce704cbf6
Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -509,7 +509,7 @@ public class ReactiveForwarding { | ... | @@ -509,7 +509,7 @@ public class ReactiveForwarding { |
509 | Ip4Prefix matchIp4DstPrefix = | 509 | Ip4Prefix matchIp4DstPrefix = |
510 | Ip4Prefix.valueOf(ipv4Packet.getDestinationAddress(), | 510 | Ip4Prefix.valueOf(ipv4Packet.getDestinationAddress(), |
511 | Ip4Prefix.MAX_MASK_LENGTH); | 511 | Ip4Prefix.MAX_MASK_LENGTH); |
512 | - selectorBuilder.matchEthType(inPkt.getEtherType()) | 512 | + selectorBuilder.matchEthType(Ethernet.TYPE_IPV4) |
513 | .matchIPSrc(matchIp4SrcPrefix) | 513 | .matchIPSrc(matchIp4SrcPrefix) |
514 | .matchIPDst(matchIp4DstPrefix); | 514 | .matchIPDst(matchIp4DstPrefix); |
515 | 515 | ||
... | @@ -552,7 +552,8 @@ public class ReactiveForwarding { | ... | @@ -552,7 +552,8 @@ public class ReactiveForwarding { |
552 | Ip6Prefix matchIp6DstPrefix = | 552 | Ip6Prefix matchIp6DstPrefix = |
553 | Ip6Prefix.valueOf(ipv6Packet.getDestinationAddress(), | 553 | Ip6Prefix.valueOf(ipv6Packet.getDestinationAddress(), |
554 | Ip6Prefix.MAX_MASK_LENGTH); | 554 | Ip6Prefix.MAX_MASK_LENGTH); |
555 | - selectorBuilder.matchIPv6Src(matchIp6SrcPrefix) | 555 | + selectorBuilder.matchEthType(Ethernet.TYPE_IPV6) |
556 | + .matchIPv6Src(matchIp6SrcPrefix) | ||
556 | .matchIPv6Dst(matchIp6DstPrefix); | 557 | .matchIPv6Dst(matchIp6DstPrefix); |
557 | 558 | ||
558 | if (matchIpv6FlowLabel) { | 559 | if (matchIpv6FlowLabel) { | ... | ... |
-
Please register or login to post a comment