Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packet/bgp: Return nil for invalid redirect IP address
When initializing IPv4AddressSpecificExtended or IPv6AddressSpecificExtended structure, nil value will be returned when an invalid IP address is given. But the redirect action extended community types; - RedirectIPv4AddressSpecificExtended - RedirectIPv6AddressSpecificExtended which embed IP address specific extended community types, are not aware of nil value when initializing, so these redirect action extended community can be unexpectedly initialized with nil value. This patch fixes to check return value of the embedded structure and also return nil when failure of initializing it. Signed-off-by: IWASE Yusuke <[email protected]>
- Loading branch information