diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2021-07-05 12:03:43 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2021-07-05 12:03:43 +0000 |
commit | f500ce9cb991fca40d1373611f12b1d6bbc9e8c2 (patch) | |
tree | 7ce4c129df09ed4fb715bce746d4b1523b53c1d3 | |
parent | ae28cdc182dee1a511b5cf201b30ddb84f422f59 (diff) |
Print SA MTU if included in pfkey message.
ok bluhm@ sthen@ mpi@
-rw-r--r-- | sbin/ipsecctl/pfkdump.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/ipsecctl/pfkdump.c b/sbin/ipsecctl/pfkdump.c index 4d7d3da7797..cc13c327c5c 100644 --- a/sbin/ipsecctl/pfkdump.c +++ b/sbin/ipsecctl/pfkdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkdump.c,v 1.52 2020/11/05 19:28:27 phessler Exp $ */ +/* $OpenBSD: pfkdump.c,v 1.53 2021/07/05 12:03:42 tobhe Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. @@ -57,6 +57,7 @@ static void print_ident(struct sadb_ext *, struct sadb_msg *, int); static void print_udpenc(struct sadb_ext *, struct sadb_msg *, int); static void print_tag(struct sadb_ext *, struct sadb_msg *, int); static void print_rdomain(struct sadb_ext *, struct sadb_msg *, int); +static void print_mtu(struct sadb_ext *, struct sadb_msg *, int); static void print_tap(struct sadb_ext *, struct sadb_msg *, int); static void print_satype(struct sadb_ext *, struct sadb_msg *, int); static void print_counter(struct sadb_ext *, struct sadb_msg *, int); @@ -108,6 +109,7 @@ struct idname ext_types[] = { { SADB_X_EXT_LIFETIME_LASTUSE, "lifetime_lastuse", print_life }, { SADB_X_EXT_TAG, "tag", print_tag }, { SADB_X_EXT_RDOMAIN, "rdomain", print_rdomain }, + { SADB_X_EXT_MTU, "mtu", print_mtu }, { SADB_X_EXT_TAP, "tap", print_tap }, { SADB_X_EXT_SATYPE2, "satype2", print_satype }, { SADB_X_EXT_COUNTER, "counter", print_counter }, @@ -411,6 +413,14 @@ print_tag(struct sadb_ext *ext, struct sadb_msg *msg, int opts) } static void +print_mtu(struct sadb_ext *ext, struct sadb_msg *msg, int opts) +{ + struct sadb_x_mtu *smtu = (struct sadb_x_mtu *)ext; + + printf("mtu %u", smtu->sadb_x_mtu_mtu); +} + +static void print_tap(struct sadb_ext *ext, struct sadb_msg *msg, int opts) { struct sadb_x_tap *stap = (struct sadb_x_tap *)ext; |