On Wed, Jan 6, 2016 at 5:33 AM, Stuart Haslam <stuart.has...@linaro.org> wrote:
> Convert IP addresses in packet header from network to CPU byte order > before comparing with policy cache. > > Signed-off-by: Stuart Haslam <stuart.has...@linaro.org> > Reviewed-by: Bill Fischofer <bill.fischo...@linaro.org> > --- > example/ipsec/odp_ipsec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c > index fab1035..45892f9 100644 > --- a/example/ipsec/odp_ipsec.c > +++ b/example/ipsec/odp_ipsec.c > @@ -771,8 +771,8 @@ pkt_disposition_e do_ipsec_in_finish(odp_packet_t pkt, > ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); > > /* Check inbound policy */ > - if ((ip->src_addr != ctx->ipsec.src_ip || > - ip->dst_addr != ctx->ipsec.dst_ip)) > + if ((odp_be_to_cpu_32(ip->src_addr) != ctx->ipsec.src_ip || > + odp_be_to_cpu_32(ip->dst_addr) != ctx->ipsec.dst_ip)) > return PKT_DROP; > > return PKT_CONTINUE; > -- > 2.1.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp