Re: Unsure of linelog configuration
David Lake via Freeradius-Users <[email protected]>
| Newsgroups | gmane.comp.freeradius.user |
|---|---|
| Message-ID | <PAXPR06MB788754400CE27BE907E68555B527A@PAXPR06MB7887.eurprd06.prod.outlook.com> |
Perfect -thank you. I have a great standalone lab so now I understand the interaction I can start to play 😊 Thank you for the very quick and detailed explanation! David From: Freeradius-Users <freeradius-users-bounces+d.lake=surrey.ac.uk@lists.freeradius.org> on behalf of Matthew Newton via Freeradius-Users <[email protected]> Date: Thursday, 31 July 2025 at 14:07 To: FreeRadius users mailing list <[email protected]> Cc: Matthew Newton <[email protected]> Subject: Re: Unsure of linelog configuration On 31/07/2025 13:41, David Lake wrote: > (4) dhcp_sqlippool: --> DHCP: Allocated IP: 192.168.2.101 from ipoe > (cid 0x010c3311bf0000 chaddr 0c:33:11:bf:00:00 giaddr 192.168.2.1) > (4) [dhcp_sqlippool] = ok > (4) linelog_dhcp: EXPAND %t %{control:Module-Success-Message} > (4) linelog_dhcp: --> Thu Jul 31 12:32:31 2025 DHCP: Allocated IP: > 192.168.2.101 from ipoe (cid 0x010c3311bf0000 chaddr 0c:33:11:bf:00:00 > giaddr 192.168.2.1) Ah, OK. dhcp_sqlippool calls the authorize method, which emits some logging information that ends up in Module-Success-Message. > After an ACK I see this: > > (5) dhcp_sqlippool: --> UPDATE dhcpippool SET expiry_time = NOW() + > INTERVAL 7200 SECOND, counter = counter + 1 WHERE pool_name = 'ipoe' AND > pool_key = '0x010c3311bf0000' AND framedipaddress = '192.168.2.101' > (5) dhcp_sqlippool: Executing query: UPDATE dhcpippool SET expiry_time = > NOW() + INTERVAL 7200 SECOND, counter = counter + 1 WHERE pool_name = > 'ipoe' AND pool_key = '0x010c3311bf0000' AND framedipaddress = > '192.168.2.101' > rlm_sql_mysql: Rows matched: 1 Changed: 1 Warnings: 0 ... > (5) linelog_dhcp: EXPAND %t %{control:Module-Success-Message} > (5) linelog_dhcp: --> Thu Jul 31 12:32:32 2025 dhcp_sqlippool_request calls the accounting method, which doesn't output any logging, so doesn't update the Module-Success-Message attribute. You'll be better to just log what you want, rather than using that attribute. Something like message="%t %{request:DHCP-Client-Hardware-Address} %{reply:DHCP-Your-IP-Address} from pool %{Pool-Name}" Add whatever attributes you need (you can call the `debug_all` policy before `linelog_dhcp` to show them all in the debug output if you're not sure what is available). -- Matthew - List info/subscribe/unsubscribe? See https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freeradius.org%2Flist%2Fusers.html&data=05%7C02%7Cd.lake%40surrey.ac.uk%7C54b2b2f0ac554563878808ddd0332722%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C638895640303736033%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=rykzPLKA42Vl%2Frs07wzbGQatPH9mNmvJ7Q7dvzWESC4%3D&reserved=0<http://www.freeradius.org/list/users.html> - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html