IP: Replace a magic number in the timestamp option processing

Remove the '2' value case absent from RFC 781.
Remove a comment.
This commit is contained in:
Francois-Xavier Le Bail 2020-09-20 13:50:39 +02:00
parent 14dc193fed
commit 0fc23895cd

View File

@ -190,16 +190,7 @@ ip_printts(netdissect_options *ndo,
case IPOPT_TS_TSANDADDR:
ND_PRINT("TS+ADDR");
break;
/*
* prespecified should really be 3, but some ones might send 2
* instead, and the IPOPT_TS_PRESPEC constant can apparently
* have both values, so we have to hard-code it here.
*/
case 2:
ND_PRINT("PRESPEC2.0");
break;
case 3: /* IPOPT_TS_PRESPEC */
case IPOPT_TS_PRESPEC:
ND_PRINT("PRESPEC");
break;
default: