Ethernet Bridge development
 help / color / mirror / Atom feed
From: Alon Bar-Lev <alon.barlev@gmail.com>
To: Stephen Hemminger <shemminger@osdl.org>,
	bridge@lists.linux-foundation.org
Subject: [Bridge] [PATCH] Allow bridge-utils to run when no TCP/IP is available
Date: Mon, 29 Oct 2007 14:08:37 +0200	[thread overview]
Message-ID: <200710291408.41267.alon.barlev@gmail.com> (raw)


This simple patch create AF_LOCAL socket instead of AF_INET so if TCP/IP
is not linked into kernel it still works.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

---

diff -urNp bridge-utils-1.2.org/libbridge/libbridge_init.c bridge-utils-1.2/libbridge/libbridge_init.c
--- bridge-utils-1.2.org/libbridge/libbridge_init.c	2006-09-09 08:30:31.000000000 +0300
+++ bridge-utils-1.2/libbridge/libbridge_init.c	2007-10-30 05:11:10.000000000 +0200
@@ -32,7 +32,7 @@ int br_socket_fd = -1;
 
 int br_init(void)
 {
-	if ((br_socket_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+	if ((br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0)
 		return errno;
 	return 0;
 }

                 reply	other threads:[~2007-10-29 12:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710291408.41267.alon.barlev@gmail.com \
    --to=alon.barlev@gmail.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox