@@ -142,7 +142,7 @@ static void
142142aoev1_issue_print (netdissect_options * ndo ,
143143 const u_char * cp , const u_int len )
144144{
145- const u_char * ep = cp + len ;
145+ const u_char * ep = ndo -> ndo_snapend ;
146146
147147 if (len < AOEV1_ISSUE_ARG_LEN )
148148 goto invalid ;
@@ -206,7 +206,7 @@ static void
206206aoev1_query_print (netdissect_options * ndo ,
207207 const u_char * cp , const u_int len )
208208{
209- const u_char * ep = cp + len ;
209+ const u_char * ep = ndo -> ndo_snapend ;
210210 uint16_t cslen ;
211211
212212 if (len < AOEV1_QUERY_ARG_LEN )
@@ -255,7 +255,7 @@ static void
255255aoev1_mac_print (netdissect_options * ndo ,
256256 const u_char * cp , const u_int len )
257257{
258- const u_char * ep = cp + len ;
258+ const u_char * ep = ndo -> ndo_snapend ;
259259 uint8_t dircount , i ;
260260
261261 if (len < AOEV1_MAC_ARG_LEN )
@@ -306,7 +306,7 @@ static void
306306aoev1_reserve_print (netdissect_options * ndo ,
307307 const u_char * cp , const u_int len )
308308{
309- const u_char * ep = cp + len ;
309+ const u_char * ep = ndo -> ndo_snapend ;
310310 uint8_t nmacs , i ;
311311
312312 if (len < AOEV1_RESERVE_ARG_LEN || (len - AOEV1_RESERVE_ARG_LEN ) % MAC_ADDR_LEN )
@@ -342,7 +342,7 @@ static void
342342aoev1_print (netdissect_options * ndo ,
343343 const u_char * cp , const u_int len )
344344{
345- const u_char * ep = cp + len ;
345+ const u_char * ep = ndo -> ndo_snapend ;
346346 uint8_t flags , command ;
347347 void (* cmd_decoder )(netdissect_options * , const u_char * , const u_int );
348348
399399aoe_print (netdissect_options * ndo ,
400400 const u_char * cp , const u_int len )
401401{
402- const u_char * ep = cp + len ;
402+ const u_char * ep = ndo -> ndo_snapend ;
403403 uint8_t ver ;
404404
405405 ND_PRINT ("AoE length %u" , len );
0 commit comments