Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bsd sockopt problem #17571

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Conversation

donaldsharp
Copy link
Member

See individual commits, but this should fix the freebsd issue being seen on not being able to connect via vtysh.

When finding a send/receive buffer size that is usable
let's report how big we were able to set it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Commit: 9112fb3

Introduced the idea of setting the socket buffer
send/receive sizes.  BSD's in general have the fun
issue of not allowing nearly as large as a size as
linux.  Since the above commit was developed on linux
and not run on bsd it was never tested.  Modify the
codebase to use the backoff setsockopt that we have
in the code base and use the returned values to allow
us to notice what was set and respond appropriately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@donaldsharp
Copy link
Member Author

@Mergifyio backport stable/10.2

Copy link

mergify bot commented Dec 3, 2024

backport stable/10.2

✅ Backports have been created

@donaldsharp
Copy link
Member Author

@ocochard - Please test this on freebsd for me. I royally fucked up my freebsd installation.

@Jafaral Jafaral added the bugfix label Dec 4, 2024
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@donaldsharp
Copy link
Member Author

sharpd@freebsd:/work/sharpd/frr $ sudo vtysh
2024/12/04 12:33:55 [H0DHT-S9KF2][EC 100663299] setsockopt_so_recvbuf: fd 3: SO_RCVBUF set to 1048576 (requested 16777216)

Hello, this is FRRouting (version 10.3-dev-MyOwnFRRVersion-g959dbe27cd).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

This is a git build of frr-10.3-dev-190-g959dbe27cd
Associated branch(es):
	local:master
	git@github.com:donaldsharp/frr.git/fix_bsd_sockopt_problem

freebsd# show ip route
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/0] via 192.168.45.1, vtnet0, 00:00:17
C>* 192.168.45.0/24 [0/1] is directly connected, vtnet0, weight 1, 00:00:17
L>* 192.168.45.162/32 is directly connected, vtnet0, weight 1, 00:00:17
freebsd# 

I got my freebsd working this morning and it works.

@ton31337 ton31337 merged commit 75e9b1b into FRRouting:master Dec 4, 2024
18 checks passed
ton31337 added a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants