Commit 9add601
[starnix] Don't hardcode iface name in
Before this change, `ioctl(_, SIOCGIFINDEX, _)` returned a value of of
`1` if the requested interface name was `sta-iface-name`. The value `1`
is usually assigned to the loopback interface has a different name and
the name `sta-iface-name` may not be present on all systems.
The changes implements `ioctl(_, SIOCGIFINDEX, _)` (for inet sockets)
by requesting the interface index for the interface name from the
netstack.
Bug: 128604, 129059
Bug: b/286855878
Change-Id: I4c8cf3eaf8a011ba9f8b970a3c330bb87e9a7a89
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/870847
Reviewed-by: Theodore Dubois <tbodt@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Kiet Tran <kiettran@google.com>
Fuchsia-Auto-Submit: Ghanan Gowripalan <ghanan@google.com>SIOCGIFINDEX
1 parent bd34d9e commit 9add601
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
288 | | - | |
289 | | - | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
298 | 312 | | |
299 | 313 | | |
300 | | - | |
301 | | - | |
| 314 | + | |
302 | 315 | | |
303 | 316 | | |
304 | 317 | | |
| |||
0 commit comments