Thread (15 messages) 15 messages, 5 authors, 2012-10-23

Re: [PATCH net-next] sockopt: Make SO_BINDTODEVICE readable

flat view

From: Eric Dumazet <hidden>
Date: 2012-10-22 21:37:16

On Mon, 2012-10-22 at 17:20 -0400, Brian Haley wrote:
It's not much different from what's there:

	setsockopt("foo");

	rename foo -> bar

	index = getsockopt();
	if_indextoname(index) -> "bar"

I more raised the issue since you pass a 'char *' to setsockopt() but an 'int *'
to getsockopt(), I don't think any other value is non-symmetrical like this.

-Brian
I meant another cpu can be changing dev->name[] content while the
strcpy() is done, and you get a mangled devname, like "for" or "bao"
instead of "foo" or "bar"

But yes, I obviously understood your point about "char *" and "int *"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help