summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorgdt <gdt>2004-01-06 00:36:51 +0000
committergdt <gdt>2004-01-06 00:36:51 +0000
commitdbee01fe8b0dc1fd0a5de7e9edcbf319f55a4c92 (patch)
treeee27918586ee3e775cba4e0b6cb1270270056036 /zebra/kernel_socket.c
parent2934f28ef196ffeb414c9fb8667742d053bc8b40 (diff)
increase buffer size for kernel reads
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index e2e25d49..59bb023b 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -872,6 +872,13 @@ kernel_read (struct thread *thread)
int nbytes;
struct rt_msghdr *rtm;
+ /*
+ * This must be big enough for any message the kernel might send.
+ * The code previously used RTAX_MAX struct sockaddrs in all cases,
+ * but now that sockaddrs are variable size, this doesn't work
+ * (Solaris has 244 bytes of sdl_data!). For now, add a struct
+ * sockaddr_dl to the case where it is used.
+ */
union
{
/* Routing information. */
@@ -885,7 +892,8 @@ kernel_read (struct thread *thread)
struct
{
struct if_msghdr ifm;
- struct sockaddr addr[RTAX_MAX];
+ struct sockaddr_dl;
+ struct sockaddr addr[RTAX_MAX-1];
} im;
/* Interface address information. */