login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
openbsd-tech
»
2009
»
May
»
2
Re: traceroute AS printing
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Claudio Jeker
Subject:
Re: traceroute AS printing
Date: Saturday, May 2, 2009 - 7:05 am
On Sat, May 02, 2009 at 01:39:53PM +0000, Gilles Chehade wrote:
quoted text
> On Sat, May 02, 2009 at 05:36:52AM -0700, patrick keshishian wrote: > > On Sat, May 02, 2009 at 12:11:42PM +0100, Stuart Henderson wrote: > > > +int > > > +print_asn(char *addr) > > > +{ > > > + FILE *f; > > > + char buf[1024]; > > > + int i; > > > + int found = 0; > > > > > > + if (addr == NULL) > > > + return -1; > > > + > > > + if(snprintf(buf, 1024, BGPCTL " -s %s show rib %s 2> /dev/null", > > > + bgpsock, addr) == -1) > > > + return -1; > > > > Check for snprintf() return value is incorrect. Should be more > > like so: > > > > i = snprintf(buf, sizeof(buf), BGPCTL > > " -s %s show rib %s 2> /dev/null", bgpsock, addr); > > if (i >= sizeof(buf)) /* buf is too small */ > > return -1; > > > > > > Actually it should be more like so: > > i = snprintf(buf, sizeof(buf), BGPCTL, > " -s %s show rib %s 2> /dev/null", bgpsock, addr); > if (i >= sizeof(buf) || i == -1) > return -1; >
Actually I think it should directly talk to the socket and not fork of bgpctl for every lookup. -- :wq Claudio
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
traceroute AS printing
, Stuart Henderson
, (Sat May 2, 4:11 am)
Re: traceroute AS printing
, patrick keshishian
, (Sat May 2, 5:36 am)
Re: traceroute AS printing
, Gilles Chehade
, (Sat May 2, 6:39 am)
Re: traceroute AS printing
, Claudio Jeker
, (Sat May 2, 7:05 am)
Re: traceroute AS printing
, Stuart Henderson
, (Sat May 2, 1:32 pm)
Re: traceroute AS printing
, Stuart Henderson
, (Tue May 5, 3:00 am)
Re: traceroute AS printing
, Stuart Henderson
, (Tue May 5, 5:48 am)
Re: traceroute AS printing
, patrick keshishian
, (Tue May 5, 9:00 am)
Re: traceroute AS printing
, Claudio Jeker
, (Tue May 5, 11:18 am)
Re: traceroute AS printing
, Henning Brauer
, (Thu May 7, 6:44 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Gautham R Shenoy
[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend
Jeffrey V. Merkey
Re: Versioning file system
James Bottomley
Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700
David Miller
Re: NO_HZ: timer interrupt stuck
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Miles Bader
Re: way to automatically add untracked files?
Harvey Harrison
Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem
Alex Riesen
Re: git exclude patterns for directory
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
netfilter: nf_conntrack_sip: add T.38 FAX support
Linux Kernel Mailing List
drivers/acpi: use kasprintf
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
联系系统管理员
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Damien Miller
Re: Patching a SSH 'Weakness'
frantisek holop
Re: mount ffs as msdos, system hangs
Colocation donated by:
Syndicate