Some networks use AS23456 in their IRR macros because they have
downstreams with ASN >= 65536 and obviously they want any
16-bit-only-speaking upstreams to accept their customer prefixes.
I noticed AS-BLANK and AS-SPACENET but there are others; see
http://www.robtex.com/as/as23456.html

So currently, for macros which end up including 23456, bgpctl
irrfilter generates filter files which bgpd won't read.

Would it make sense for irrfilter to avoid including these
(possible diff below) or should bgpd accept this in filters?

Index: irr_output.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpctl/irr_output.c,v
retrieving revision 1.13
diff -u -p -r1.13 irr_output.c
--- irr_output.c        5 Mar 2007 17:28:21 -0000       1.13
+++ irr_output.c        26 Aug 2011 14:20:15 -0000
@@ -143,8 +143,9 @@ policy_torule(FILE *fh, struct policy_it
                        if (strlen(ass->as[i]) < 3)
                                errx(1, "%s not AS...", ass->as[i]);
                        srcas = ass->as[i] + 2;
-                       for (j = 0; j < pfxs->prefixcnt; j++)
-                               print_rule(fh, pi, srcas, pfxs->prefix[j]);
+                       if (!strcmp(srcas, "23456"))
+                               for (j = 0; j < pfxs->prefixcnt; j++)
+                                       print_rule(fh, pi, srcas, 
pfxs->prefix[j]);
                }
        }
 }

Reply via email to