Commit Briefs

4b49d4df7a Stefan Sperling

silence ifconfig errors related to carp demotion at boot time (carpdemote)

This happens when nsh is started by /etc/rc.d/nsh during boot. The /etc/rc script starts package scripts with carp-interlock already enabled, and both ifconfig and nsh would attempt to reset the carp demotion counter. Generally, this is harmless, apart from an error message displayed by ifconfig which might mislead users into assuming there was a problem: starting package daemons: nsh. ifconfig: carp: SIOCSIFGATTR: Invalid argument To avoid this issue, nsh can check whether the demotion counter has already been set to the desired level and only change the counter if changing it is indeed required.


ddce9e236b Stefan Sperling

avoid use of uninitialized variable 'sin'

found by codechecker


76ca437888 Stefan Sperling

call getprogname(3) instead of reading __progname which is reserved

found by codechecker


0afff63a21 Stefan Sperling

ifmedia words are 64 bit wide on openbsd

found by codechecker


84d6fbcbec Stefan Sperling

handle SIGWINCH in a signal-safe way

The setwinsize() function calls an ioctl which is not async-signal-safe. Use a safe signal handler and change window size in command loop instead. found by codechecker


3ce23c08d0 Stefan Sperling

left-shift by 32 bits needs to use unsigned long long

found by codechecker


ed18441760 Stefan Sperling

need to free vis on error in mbs2ws()

found by codechecker


c550e428fb Stefan Sperling

plug file descriptor leak in who.c

found by codechecker


50e10c0364 Stefan Sperling

handle edge-case of zero no-commands in complete_nocmd(); should not happen

found by codechecker


7988c7a7ca Stefan Sperling

must initialize ndp.c variable 'nbi' in case for-loop never runs

found by codechecker


cba0363734 Stefan Sperling

in growwgdata, preserve original pointer during realloc for freeing on error

found by codechecker


fd571e3ef4 Stefan Sperling

preserve original pointer during realloc and free on error

found by codechecker


2a3c7d42fe Stefan Sperling

preserve original pointer during realloc() and free on error return

found by codechecker




ef7d91bd78 GitHub

Update README.md

Update with rendering from latest manual page


4ed0906886 Stefan Sperling

allow the interface command to work within an interface context

ok Tom


6eaf41b8f4 GitHub

Merge pull request #154 from smytht/exclamation-mark-change

! without arguments should not fork a new shell



7c9055e023 GitHub

Update commands.c

fix typo in exit command in bridge commands struct


d945a704d9 Stefan Sperling

fix typo in exit command in bridge commands struct

This is the intended change from commit cfd60254


6d3fba0f58 GitHub

! without arguments should not fork a new shell

This Diff changes the behaviour of nsh interactively by checking if ! has been entered without any arguments, if the user is in global config mode or privileged mode the user is returned to the same prompt. if the user is in interface config mode or bridge config mode the user is returned to the global configuration mode This is to facilitate users copying and pasting nshrc configuration from one device to another interactively.


5d005592cb Stefan Sperling

backout: fix typo in bridge commands struct (missing) field for exit command

Unintended changes were mixed into this commit; discussed with Tom


fd4494f6c6 GitHub

Merge pull request #153 from stspdotname/pairfix

fix conf_patch to avoid overwriting the current interface being shown I have reviewed the Code what stsp describes makes sense and the diff works and appears to solves the issue raised by ryan-sg OK Tom


cfd602546a GitHub

fix typo in bridge commands struct (missing) field for exit command

fix typo in bridge commands struct (missing) field for exit command