Change-Id: I08544b2f06f993c8a6435901232a0616d0548b94
Signed-off-by: Matus Fabian <matfabia@cisco.com>
u8 is_add = 1;
ip6_address_t in_addr;
ip4_address_t out_addr;
- u16 in_port;
- u16 out_port;
+ u16 in_port = 0;
+ u16 out_port = 0;
u32 vrf_id = 0;
snat_protocol_t proto = 0;
u8 p = 0;
}
}
+ if (!in_port)
+ {
+ error = clib_error_return (0, "inside port and address must be set");
+ goto done;
+ }
+
+ if (!out_port)
+ {
+ error = clib_error_return (0, "outside port and address must be set");
+ goto done;
+ }
+
p = snat_proto_to_ip_proto (proto);
rv =