Commit 67b8a0f1 authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

unix-socket: get interface name from port name by default

If interface name is empty, look for a network interface with the same
name of the port.
Signed-off-by: Davide Ciminaghi's avatarDavide Ciminaghi <ciminaghi@gnudd.com>
parent 3d21341d
...@@ -469,6 +469,10 @@ static int unix_net_init(struct pp_instance *ppi) ...@@ -469,6 +469,10 @@ static int unix_net_init(struct pp_instance *ppi)
/* The buffer is inside ppi, but we need to set pointers and align */ /* The buffer is inside ppi, but we need to set pointers and align */
pp_prepare_pointers(ppi); pp_prepare_pointers(ppi);
if (!ppi->iface_name || !ppi->iface_name[0])
/* No interface name, set it to port name */
ppi->iface_name = ppi->port_name;
switch(ppi->proto) { switch(ppi->proto) {
case PPSI_PROTO_RAW: case PPSI_PROTO_RAW:
pp_diag(ppi, frames, 1, "unix_net_init raw Ethernet\n"); pp_diag(ppi, frames, 1, "unix_net_init raw Ethernet\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment