Bug 208174 - share/man/man4/carp.4: carp devd notify example does not handle VLANs
Summary: share/man/man4/carp.4: carp devd notify example does not handle VLANs
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: easy, needs-patch
Depends on:
Blocks:
 
Reported: 2016-03-21 09:23 UTC by bmeyer
Modified: 2020-06-07 00:23 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bmeyer 2016-03-21 09:23:26 UTC
The example devd entry in the carp(4) man page doesn't handle if you are dealing with a VLAN.  

This is the extract from the existing man page relating to carp.  

---> CUT HERE <---
           notify 0 {
                   match "system"          "CARP";
                   match "subsystem"       "[0-9]+@[0-9a-z]+";
                   match "type"            "(MASTER|BACKUP)";
                   action "/root/carpcontrol.sh $subsystem $type";
           };
---> END CUT <---

Here is a slightly *corrected* entry which handles VLANs.  

---> CUT HERE <---
           notify 0 {
                   match "system"          "CARP";
                   match "subsystem"       "[0-9]+@[0-9a-z\.]+";
                   match "type"            "(MASTER|BACKUP)";
                   action "/root/carpcontrol.sh $subsystem $type";
           };
---> END CUT <---

This handles when there is an subsystem attached to a VLAN (by allowing the "." character in the class).  For example:
   3@em0.1030
or
   2@lagg0.1050