X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnx-match.c;h=51b6dc64568b10b4ee44951b852c9494ac00ac20;hb=add037c6b692db9c66dd0c16dff2d4b1b46c7499;hp=bfead6808e2781f28c61701de9447067906a3e09;hpb=7fa0f73fb284b4406bcd085ee62552891b3fa6cd;p=sliver-openvswitch.git diff --git a/lib/nx-match.c b/lib/nx-match.c index bfead6808..51b6dc645 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -517,8 +517,11 @@ nxm_put_ip(struct ofpbuf *b, const struct match *match, nxm_put_frag(b, match); if (match->wc.masks.nw_tos & IP_DSCP_MASK) { - nxm_put_8(b, oxm ? OXM_OF_IP_DSCP : NXM_OF_IP_TOS, - flow->nw_tos & IP_DSCP_MASK); + if (oxm) { + nxm_put_8(b, OXM_OF_IP_DSCP, flow->nw_tos >> 2); + } else { + nxm_put_8(b, NXM_OF_IP_TOS, flow->nw_tos & IP_DSCP_MASK); + } } if (match->wc.masks.nw_tos & IP_ECN_MASK) { @@ -687,7 +690,13 @@ nx_put_raw(struct ofpbuf *b, bool oxm, const struct match *match, /* Tunnel ID. */ nxm_put_64m(b, oxm ? OXM_OF_TUNNEL_ID : NXM_NX_TUN_ID, - flow->tunnel.tun_id, match->wc.masks.tunnel.tun_id); + flow->tunnel.tun_id, match->wc.masks.tunnel.tun_id); + + /* Other tunnel metadata. */ + nxm_put_32m(b, NXM_NX_TUN_IPV4_SRC, + flow->tunnel.ip_src, match->wc.masks.tunnel.ip_src); + nxm_put_32m(b, NXM_NX_TUN_IPV4_DST, + flow->tunnel.ip_dst, match->wc.masks.tunnel.ip_dst); /* Registers. */ for (i = 0; i < FLOW_N_REGS; i++) {