]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-dhcp6.c
DHCPv6: axe a couple invariant expressions
[tcpdump] / print-dhcp6.c
index 178ec6f8953f503d118b7f130855ec7111e4bb81..cd7a588ed0103be931ea7abb6c700cfc38f0b168 100644 (file)
@@ -185,9 +185,6 @@ dhcp6opt_name(int type)
 {
        static char genstr[sizeof("opt_65535") + 1]; /* XXX thread unsafe */
 
-       if (type > 65535)
-               return "INVALID-option";
-
        switch(type) {
        case DH6OPT_CLIENTID:
                return "client-ID";
@@ -883,10 +880,8 @@ dhcp6_print(netdissect_options *ndo,
        if (!ndo->ndo_vflag) {
                if (name)
                        ND_PRINT((ndo, " %s", name));
-               else if (dh6->dh6_msgtype != DH6_RELAY_FORW &&
-                   dh6->dh6_msgtype != DH6_RELAY_REPLY) {
+               else
                        ND_PRINT((ndo, " msgtype-%u", dh6->dh6_msgtype));
-               }
                return;
        }