[GTP] Support binding socket to device

This is useful, among other possible applications, to make use of VRFs [1],
in this case for GTP-C and GTP-U traffic in the PGW.

The bind_dev field is added to the ogs_socknode_t so that it's easy to
extend its use into lots of other sockets being set up based on config
file information.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/vrf.rst
This commit is contained in:
Pau Espin Pedrol 2022-02-28 18:20:48 +01:00
parent ed3444eef5
commit 7bddc92322
13 changed files with 90 additions and 34 deletions

View file

@ -396,7 +396,7 @@ static void test7_func(abts_case *tc, void *data)
ogs_socknode_remove_all(&list);
rv = ogs_socknode_probe(&list, &list6, NULL, PORT);
rv = ogs_socknode_probe(&list, &list6, NULL, PORT, NULL);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
ogs_socknode_remove_all(&list);