Thread (3 messages) 3 messages, 2 authors, 2017-08-17

Re: [PATCHv2 net-next iproute2] gre: add support for ERSPAN tunnel

flat view

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-08-10 22:12:21

On Thu, 10 Aug 2017 13:14:27 -0700
William Tu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+
+		if (greinfo[IFLA_GRE_ERSPAN_INDEX])
+			erspan_idx = rta_getattr_u32(greinfo[IFLA_GRE_ERSPAN_INDEX]);
 	}
Are you missing a ntohl() here?

It is encoded as htonl() when sending to kernel.

 		addattr32(n, 1024, IFLA_GRE_FWMARK, fwmark);
+		addattr32(n, 1024, IFLA_GRE_ERSPAN_INDEX, htonl(erspan_idx));

Is erspan_idx == 0 a reserved value?
You should only send erspan_idx to kernel if it is given on command line.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help