just a style thing, but it's usual to write

```
match Ipv4.get_gateways i.ipv4 with
| [] -> ()
| x -> ret := Some x
```

In this case the rest is imperative so I dont think it matters too much