- } else if (!strcasecmp(act, "set_tunnel")) {
- struct nx_action_set_tunnel *nast;
- nast = put_action(b, sizeof *nast, OFPAT_VENDOR);
- nast->vendor = htonl(NX_VENDOR_ID);
- nast->subtype = htons(NXAST_SET_TUNNEL);
- nast->tun_id = htonl(str_to_u32(arg));
+ } else if (!strcasecmp(act, "set_tunnel")
+ || !strcasecmp(act, "set_tunnel64")) {
+ uint64_t tun_id = str_to_u64(arg);
+ if (!strcasecmp(act, "set_tunnel64") || tun_id > UINT32_MAX) {
+ struct nx_action_set_tunnel64 *nast64;
+ nast64 = put_action(b, sizeof *nast64, OFPAT_VENDOR);
+ nast64->vendor = htonl(NX_VENDOR_ID);
+ nast64->subtype = htons(NXAST_SET_TUNNEL64);
+ nast64->tun_id = htonll(tun_id);
+ } else {
+ struct nx_action_set_tunnel *nast;
+ nast = put_action(b, sizeof *nast, OFPAT_VENDOR);
+ nast->vendor = htonl(NX_VENDOR_ID);
+ nast->subtype = htons(NXAST_SET_TUNNEL);
+ nast->tun_id = htonl(tun_id);
+ }