Skip to content

Commit

Permalink
ip-xfrm: Add print support for XFRMA_SET_MARK_MASK
Browse files Browse the repository at this point in the history
Sample output
ip xfrm state
	src 192.1.2.23 dst 192.1.3.33
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 32 flag af-unspec
	output-mark 0x3/0xffffff
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	if_id 0x1

Signed-off-by: Antony Antony <antony@phenome.org>
  • Loading branch information
antonyantony committed Aug 10, 2020
1 parent afa5884 commit 69d7df7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ip/ipxfrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ static void xfrm_output_mark_print(struct rtattr *tb[], FILE *fp)
__u32 output_mark = rta_getattr_u32(tb[XFRMA_OUTPUT_MARK]);

fprintf(fp, "output-mark 0x%x", output_mark);
if (tb[XFRMA_SET_MARK_MASK]) {
__u32 mask = rta_getattr_u32(tb[XFRMA_SET_MARK_MASK]);
fprintf(fp, "/0x%x", mask);
}
}

int xfrm_parse_mark(struct xfrm_mark *mark, int *argcp, char ***argvp)
Expand Down

0 comments on commit 69d7df7

Please sign in to comment.