[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 1356] TR: [altq 1355] Conditioning in a FreeBSD bridge



Oops, I forgot:

I added the hook only for IP6, which was what I needed, but it wouldn't be
different for IP4.

Julio OROZCO
Thésard
Département Réseaux et Services Multimédia
ENST-Bretagne, Rennes
Bureau: +33 299 127046
Mobile: +33 662 417272
julio.orozco@enst-bretagne.fr

-----Message d'origine-----
De : owner-altq@csl.sony.co.jp [mailto:owner-altq@csl.sony.co.jp]De la
part de Julio OROZCO
Envoyé : mardi 19 février 2002 11:32
À : altq@csl.sony.co.jp
Objet : [altq 1355] Conditioning in a FreeBSD bridge


I set up a conditioning bridge (FreeBSD 4.4), adding the hook not to the
bridge code, but the ether_input code.

I've done tests with marking and it works fine. It may need more tests to
find how it works in a station that conditions in bridge AND router modes,
for example.

ether_input(ifp, eh, m)

. . .

{

. . .

#ifdef BRIDGE
	/* Check for bridging mode */
	if (do_bridge && BDG_USED(ifp) ) {
		struct ifnet *bif;

		/* Check with bridging code */
		if ((bif = bridge_in(ifp, eh)) == BDG_DROP) {
			m_freem(m);
			return;
		}
		if (bif != BDG_LOCAL) {
			struct mbuf *oldm = m ;
+#ifdef ALTQ
+	if (altq_input != NULL && (*altq_input)(m, AF_INET6) == 0) {
+		/* packet is dropped by traffic conditioner */
+		return;
+	}
+#endif
. . .
       }
#endif

Regards,

Julio OROZCO
Thésard
Département Réseaux et Services Multimédia
ENST-Bretagne, Rennes
Bureau: +33 299 127046
Mobile: +33 662 417272
julio.orozco@enst-bretagne.fr