summaryrefslogtreecommitdiffstats
path: root/ax25ipd/bpqether.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed spelling erorrs.HEADmasterThomas Osterried2023-05-131-1/+1
| | | | Signed-off-by: Thomas Osterried <dl9sau@darc.de>
* ax25ipd: Fix warning and potential buffer overflow in bpqether.c.Ralf Baechle2021-07-281-2/+13
| | | | | | | | | | | | | | | | Adding an additional check convinces GCC 11 there won't be a buffer overflow. Reading the code it's pretty hard to convince myself overflow is impossible so just suck it up and throw a potentially pointless check into the spaghetti. gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -g -O2 -Wall -MT bpqether.o -MD -MP -MF .deps/bpqether.Tpo -c -o bpqether.o bpqether.c In function ‘tun_alloc’, inlined from ‘open_ethertap’ at bpqether.c:196:8: bpqether.c:142:17: warning: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 4095 [-Wstringop-truncation] 142 | strncpy(ifr.ifr_name, dev, IFNAMSIZ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Kill assignments in if conditions.Ralf Baechle2017-08-031-5/+10
| | | | | | | | | | | | | | | | | | | Somewhat hard to read and the code base already has many overlong lines Found with below spatch files: @parens@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Cleanup header file inclusion.Ralf Baechle2017-07-261-4/+5
| | | | | | | | | | We were including way too many system header files, some even multiple times and it wasn't immediately visible. Clean this. This also drops the definitions of __USE_XOPEN which never had the desired effect with glibc. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Sort out variable and function declarations.Ralf Baechle2017-01-311-2/+1
| | | | | | | | | | - Make static what can be made static. - Add declaration where they were missing. - Don't define variables in headers. - Move declaations to the proper locations. - Pick up declarations from the proper headers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Fix grammar of bpether log message.Ralf Baechle2015-05-281-1/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Reformat consistently. Strictly whitespace changes only.Ralf Baechle2015-05-021-244/+244
| | | | | | | Indentation by tabs only. Move case labels in switches are on the same level as the switch keyword. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Nuke trailing whitespace.Ralf Baechle2015-05-021-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Weed out all use of RCS strings.Ralf Baechle2013-06-051-2/+0
| | | | | | | Their value has always been dubious and git doesn't support them so let's get rid of the clutter. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Added some includes. This fixes compilation problems in gentoo,Thomas Osterried2009-04-221-2/+1
| | | | and warnings.
* PATH_MAX: linux include standard has changed.Thomas Osterried2008-12-211-1/+2
| | | | now we need to include limits.h
* Fix warnings about // style comment. And remove some of the mostRalf Baechle2007-01-231-17/+27
| | | | pointless comments.
* - make compiler happyThomas Osterried2005-10-311-5/+3
|
* - tun/tap support for ax25ipdThomas Osterried2005-10-301-0/+342
- fclose() fix in config.c description of tun/tap: added a new fast and efficient link to the linux kernel ax25 stack, via the ethertap interface. ax25 goes directly to the bpqether interface in the kernel via ethertap/tuntap interfaces, which is a much better way than traditional kissattach to a ttyp/ptyp pair.