Rev 4500 | Rev 4558 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4500 | Rev 4505 | ||
---|---|---|---|
Line 546... | Line 546... | ||
546 | void * padding; |
546 | void * padding; |
547 | eth_preamble_ref preamble; |
547 | eth_preamble_ref preamble; |
548 | 548 | ||
549 | length = packet_get_addr( packet, & src, & dest ); |
549 | length = packet_get_addr( packet, & src, & dest ); |
550 | if( length < 0 ) return length; |
550 | if( length < 0 ) return length; |
551 | if( length < ETH_ADDR ) return EINVAL; |
551 | if( length != ETH_ADDR ) return EINVAL; |
552 | length = packet_get_data_length( packet ); |
552 | length = packet_get_data_length( packet ); |
553 | if( length > mtu ) return EINVAL; |
553 | if( length > mtu ) return EINVAL; |
554 | if( length < ETH_MIN_TAGGED_CONTENT( flags )){ |
554 | if( length < ETH_MIN_TAGGED_CONTENT( flags )){ |
555 | padding = packet_suffix( packet, ETH_MIN_TAGGED_CONTENT( flags ) - length ); |
555 | padding = packet_suffix( packet, ETH_MIN_TAGGED_CONTENT( flags ) - length ); |
556 | if( ! padding ) return ENOMEM; |
556 | if( ! padding ) return ENOMEM; |