mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 09:22:03 +00:00
increase buffer size for kernel reads
This commit is contained in:
parent
2934f28ef1
commit
dbee01fe8b
@ -1,3 +1,10 @@
|
|||||||
|
2004-01-05 Greg Troxel <gdt@fnord.ir.bbn.com>
|
||||||
|
|
||||||
|
* kernel_socket.c (kernel_read): Add a sockaddr_dl to the ifmsg
|
||||||
|
structure, because on Solaris sockaddr_dl is far larger than the
|
||||||
|
base sockaddr structure. (The code had previously been failing to
|
||||||
|
read all the data.)
|
||||||
|
|
||||||
2004-01-05 Greg Troxel <gdt@ahi.ir.bbn.com>
|
2004-01-05 Greg Troxel <gdt@ahi.ir.bbn.com>
|
||||||
|
|
||||||
* kernel_socket.c (kernel_read): Look up interfaces by index
|
* kernel_socket.c (kernel_read): Look up interfaces by index
|
||||||
|
@ -872,6 +872,13 @@ kernel_read (struct thread *thread)
|
|||||||
int nbytes;
|
int nbytes;
|
||||||
struct rt_msghdr *rtm;
|
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
|
union
|
||||||
{
|
{
|
||||||
/* Routing information. */
|
/* Routing information. */
|
||||||
@ -885,7 +892,8 @@ kernel_read (struct thread *thread)
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct if_msghdr ifm;
|
struct if_msghdr ifm;
|
||||||
struct sockaddr addr[RTAX_MAX];
|
struct sockaddr_dl;
|
||||||
|
struct sockaddr addr[RTAX_MAX-1];
|
||||||
} im;
|
} im;
|
||||||
|
|
||||||
/* Interface address information. */
|
/* Interface address information. */
|
||||||
|
Loading…
Reference in New Issue
Block a user