diff options
| author | Michael Brown | 2008-06-09 23:56:48 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-06-10 01:01:29 +0200 |
| commit | aa160211c22da70cce4a28d19fb5bd00b16e840d (patch) | |
| tree | 781f107790c48683e2c8aa82eb4f6837449fc512 /src/include | |
| parent | [ELF] Add ability to boot ELF images generated by wraplinux and mkelfImage (diff) | |
| download | ipxe-aa160211c22da70cce4a28d19fb5bd00b16e840d.tar.gz ipxe-aa160211c22da70cce4a28d19fb5bd00b16e840d.tar.xz ipxe-aa160211c22da70cce4a28d19fb5bd00b16e840d.zip | |
[udp] Verify local socket address (if specified) for UDP sockets
UDP sockets can be used for multicast, at which point it becomes
plausible that we could receive packets that aren't destined for us
but that still match on a port number.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/in.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/gpxe/in.h b/src/include/gpxe/in.h index 89530a559..40e4d4073 100644 --- a/src/include/gpxe/in.h +++ b/src/include/gpxe/in.h @@ -62,6 +62,15 @@ struct sockaddr_in { uint16_t sin_port; /** IPv4 address */ struct in_addr sin_addr; + /** Padding + * + * This ensures that a struct @c sockaddr_tcpip is large + * enough to hold a socket address for any TCP/IP address + * family. + */ + char pad[ sizeof ( struct sockaddr ) - sizeof ( sa_family_t ) + - sizeof ( uint16_t ) + - sizeof ( struct in_addr ) ]; }; /** |
