Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 Implement access control based on client MAC address

open
nobody
None
5
2010-01-09
2010-01-09
Dominik Epple
No

Please find in the attachment another patch. It implements MAC-Address based access control.

I use "git" at home. This patch is created against my "portable" version of minidlna, see 2928850 and 2928851 in the patches tracker. I was unable to use "cvs diff" since my other patches are not applied upstream yet. I hope you will be able to apply this patch nevertheless. If not, please let me know.

To use this feature, add in the config file something like

allowed_mac=0:12:34:56:ab:cd

Discussion

  • DerGrinch
    DerGrinch
    2010-08-30

    Just one thing which could be added: upper- or lowercase the mac-addresses, so that its working with e7:xxx and E7:xxx. I needed debug-logging to see that my system wants uppercase MAC-addresses while the example in the conf-file is lowercase.
    Anyway, great patch. thanks ;)

    Greets...

     
  • DerGrinch
    DerGrinch
    2010-08-30

    And another thing: multiple MACs are not working properly:

    log:
    [2010/08/31 00:46:05] upnphttp.c:399: debug: Added client [3/192.168.0.32/E4:7C:F9:51:1C:2C] to cache slot 0.
    [2010/08/31 00:46:05] upnphttp.c:714: debug: Client with IP 192.168.0.32 has MAC E4:7C:F9:51:1C:2C which is not configured to be allowed. Sending access denied.
    [2010/08/31 00:46:17] upnphttp.c:399: debug: Added client [100/192.168.0.30/00:23:54:62:85:4E] to cache slot 1.
    [2010/08/31 00:46:17] upnphttp.c:756: debug: HTTP REQUEST: GET /rootDesc.xml HTTP/1.1
    (All working fine)

    config:
    allowed_mac=00:23:54:62:85:4E
    allowed_mac=E4:7C:F9:51:1C:2C