summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Refresh the interface objects if DHCP mode changesRatan Gupta2017-06-293-4/+27
| | | | | | | | | | Create the ipaddress objects for the ethernet interface whose DHCP is enabled. Resolves openbmc/openbmc#1295 Change-Id: Id5ad35f1d51f2bf80c4e2b573e7bd38489370411 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Move function from network manager to utility functionRatan Gupta2017-06-215-121/+117
| | | | | | | | Function which fetches the interface address from the system. Add some types to types.hpp Change-Id: Ie2c02980a9fd7a0aaeafa22d93bc758b5c79fd04 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the DHCP supportRatan Gupta2017-06-212-2/+46
| | | | | | | | | | | During creation of ethernet interface dbus object, read the DHCP from the conf file. Write the DHCP option in the conf file during writing the network configuration file. Change-Id: Ibead1ff91d30d14c475493d1ef2c877d14d0d915 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the INI config parserRatan Gupta2017-06-215-2/+358
| | | | | | | | Parse the systemd.network file to get the configuration parameter. Change-Id: Ic9c15a46158d2f1c0948e6eca729663e87051491 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the system conf Dbus ObjectRatan Gupta2017-06-214-13/+52
| | | | | | | | Also put extra checks while writing the gateway and the destination to the conf file. Change-Id: I8f24b3f293e6f978b655f061a198a32690dd44f3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement system configuration Dbus interfaceRatan Gupta2017-06-215-8/+189
| | | | | Change-Id: I713175e946af47990afcead00558ee4b90cbce8e Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Revert the BUFFSIZE from PAGE_SIZE to constantRatan Gupta2017-06-091-2/+1
| | | | | Change-Id: Id9300b55b1c32fff2d1f9fffdcfa6c3d6e021d38 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the ipaddress origin and gateway propertyRatan Gupta2017-06-094-6/+59
| | | | | | | Resolves openbmc/openbmc#1590 Change-Id: I76328e596336f8b8f1394b1927d48ce52f819a66 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Fetch the kernel routing tableRatan Gupta2017-06-093-3/+339
| | | | | | | | | | It would be used to get the gateway for a specific network. It would also be used to get the default gateway for the system. Change-Id: I1f7f81e1d6ea6c3f4385f454ad229d4074341c44 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Fetch the network portion of the IP addressRatan Gupta2017-06-085-6/+106
| | | | | | | eg 192.168.2.24/24 ==> 192.168.2.0 Change-Id: I5e46ce7b371360c90ef74fac175c8379c6f31d4c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: add test cases for ethernet interfaceRatan Gupta2017-06-084-5/+163
| | | | | Change-Id: Ibf3a2b3513c784a56540488fa7de5a638a83a833 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: Add test cases for network managerRatan Gupta2017-06-085-4/+213
| | | | | | | Resolves openbmc/openbmc#1462 Change-Id: Ib4cb6fc52dca05c9af38fe5197d9d7dff2031af7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Write the network configuration in the network fileRatan Gupta2017-06-085-4/+92
| | | | | Change-Id: Ic5ae90fb7b82539b943c4db0bc2eb116ec0d778f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Restructure the code so that it is unit testableRatan Gupta2017-06-087-25/+72
| | | | | Change-Id: I2af7a26d054522beae82f58769f8c2420a22eca2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: Add unit test cases for utilRatan Gupta2017-06-084-1/+110
| | | | | Change-Id: I75cc1c1642bd4160191853d6ebfa5427e7f534c3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add the network utility fileRatan Gupta2017-06-086-114/+216
| | | | | | | | | | Moving utility functions from network manager to util.cpp. Added few more utility functions. Change-Id: I2e73c873e9a3bea543d6979463b2181e8374e12e Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create error log if unable to fetch the interface infoRatan Gupta2017-06-082-8/+8
| | | | | Change-Id: I3e075fa04d7d0bb6f10b80d00a0aafd676be68e6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Added the network conf dir variable in configureRatan Gupta2017-06-081-0/+4
| | | | | Change-Id: If8f7cfa2cf33c4814939234c8497ac8c6bd297e6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Convert IPv6 subnet mask into prefix lengthRatan Gupta2017-06-072-14/+84
| | | | | Change-Id: I7921400b3f83876c5d3cb1440fcbf926551cebcb Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Fixes formattingRatan Gupta2017-06-072-9/+12
| | | | | | | Add doxygen style comment. Change-Id: I913cb4b9090cb8b96d8055529d59339be5c85625 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement network factory reset in network_managerMichael Tritz2017-06-055-6/+104
| | | | | | | | | | | | This commit implements a factory reset interface for the BMC network. This factory reset is accomplished by removing any /etc/systemd/network/*.network files, then writing new ones configured for DHCP for each known interface. Resolves openbmc/openbmc#1575 Change-Id: Ic006cd43fb336029479cffa783b56ab91e0339bd Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Generate the ip address object path with the use of hashRatan Gupta2017-05-232-28/+44
| | | | | | | | | | | | ipaddress object path have the id for unique identification of ipaddres and the id would be hash of ipaddress,prefix and gateway. This was needed to make sure that there is no duplication of address object path. Change-Id: If6830d6e186e3271467ce0084c1dbf3c4995f1dd Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Convert IPv4 subnet mask into prefix lengthRatan Gupta2017-05-232-7/+61
| | | | | | | Resolves openbmc/openbmc#1292 Change-Id: I9b24e98589bd68cc59893b5e43b514bd0bec3f26 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement create interface for ipaddressRatan Gupta2017-05-236-33/+191
| | | | | Change-Id: Ia4598c27c11667dafb70a8af58871661b7042d0f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add Create interface for IP addressRatan Gupta2017-05-162-4/+43
| | | | | Change-Id: I05a7100db500bf5d8ec87c24f4d6503a03eb3581 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement ipaddress objectRatan Gupta2017-05-164-0/+49
| | | | | Change-Id: Ic4d7953c5aca2bf85a609c736e5c817322d29e4b Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define interfaces of ipaddress objectRatan Gupta2017-05-162-1/+72
| | | | | Change-Id: Ic7cb6ca0deb3e005b2c753adbe2b88c13dff7120 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement main functionRatan Gupta2017-04-271-0/+19
| | | | | | | Resolves openbmc/openbmc#1293 Change-Id: I1ba38b0c273538f55dd9d4305541989e72deb839 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement NetworkManagerRatan Gupta2017-04-273-0/+133
| | | | | Change-Id: Ifa8169d903ecab1575662cfc0f9a1c950d56144f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define the create interface for VLANRatan Gupta2017-04-273-1/+40
| | | | | | | | | | | Network Manager may implement multiple interface object Create interface helps in creating specific interface. Create interface declares the interface for creating a specific object. Change-Id: I7433a8569f7e08f9ceb0ff8d01e8c42b04b3b5af Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define interfaces of NetworkManagerRatan Gupta2017-04-272-1/+74
| | | | | Change-Id: Ia696c382b0b7cbf5980f17e0d64ed4d286db25cb Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement EthernetInterfaceRatan Gupta2017-04-273-4/+145
| | | | | Change-Id: I8d57ee3565e43e6e4463286c220dd54d72da049f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define interfaces of the EthernetInterfaceRatan Gupta2017-04-274-2/+130
| | | | | Change-Id: Ibc6030934cdb04eaf603ce730d88d0bedc0a29b3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* networkd-config: adding new line character before DHCP sectionRatan Gupta2017-03-241-1/+1
| | | | | | | Resolves openbmc/openbmc#1386 Change-Id: I03fafc64a21bb96f21b28cb88476be8eaa511ffd Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* networkd-config: force ipv4 clientid to 'mac'Patrick Williams2017-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | Traditionally the DHCP clients will send the ethernet MAC address as the 'ClientID' in the DHCP request. DHCP on IPv6 introduced a new identifier called a DUID as the primary system identifier that is sent to the DHCP server. This was also added back to IPv4 via RFC 4361 and is the default in systemd-networkd. Some legacy system installations do not support DUIDs and as a short-term fix, we will force 'mac' to be used instead of 'duid'. See openbmc/openbmc#1280 for long-term discussion. Fixes openbmc/openbmc#1272. Change-Id: Idd46c08071b51ad8d1f40f43efade98c9c030dea Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Validate the mac address during setRatan Gupta2016-11-072-4/+64
| | | | | | | | | | | | Allow the mac to be set if one of the condition is true. 1) Incoming Mac is of local admin type. or 2) Incoming mac is same as eeprom Mac. Fixes openbmc/openbmc#622 Change-Id: I4289b18b8460d56cf9956b7c3028da6468f27974 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Convert build process to autotoolsMatthew Barth2016-09-285-29/+83
| | | | | | | | | Replaced the use of a manual Makefile with the use of autotools to automatically verify and generate the necessary build files. Follow the steps outlined within the README.md file to build the package. Change-Id: I85d6b0233b287ad446a9c4296e56e7bbdf218195 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* userman.py: Fix whitespace issuesGeorge Keishing2016-09-201-3/+3
| | | | | Change-Id: I53ab2d980874a1501fdb52d9c8f1593655bcbca3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* userman interface to add user and change password pexpect fixGeorge Keishing2016-09-201-6/+10
| | | | | | | | | | | This changes addresses the following: - Default SHELL set to /bin/sh - password pexpect extra sendline Resolves openbmc/openbmc#581 Change-Id: Ie17c839f167ae862eb7873989ea32d9dc8fa25b0 Signed-off-by: George Keishing <gkeishin@in.ibm.com>
* Add support to update NTP server list in network filesVishwanatha Subbanna2016-09-151-0/+72
| | | | | | | | | | | | | | | | | | | | | | | This provides following APIs: SetNtpServer takes network device name and list of NTP server IP's or hostnames and updates the corresponding .network files with NTP= under [Network] section. Example: [Network] NTP = 1.2.3.4 time.org UpdateUseNtpField takes a string and updates all the available .network files with either UseNtp=true or UseNtp=false depending on user input. Example: [DHCP] UseNtp = false Change-Id: Iead3e6e4cdaf7e12c855c8a7d8e7d57d7037eda2 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* userman: handle weak passwordsBrad Bishop2016-09-121-3/+7
| | | | | | | | | busybox prompts for a password three times if its weak. Resolves openbmc/openbmc#543. Change-Id: I7a5ccd10e082844f6b7df065a30ad59974f1d532 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Ensure all tools are building with -Wall and -WerrorMatthew Barth2016-08-291-1/+1
| | | | | | | Added -Werror to CFLAGS. Change-Id: Ib1459098ac008ca4064d186cdbe20be13aa08d61 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* networking: ip address validationEdward A. James2016-08-021-25/+55
| | | | | | | | | | | - check user-provided ip address before assigning to network device to prevent invalid addresses or addresses in disallowed ranges (bad addresses will cause networking failures on the system) Resolves openbmc/openbmc#202. Change-Id: I03826a0b9c947dad5ececd5af5269d3daf6afed8 Signed-off-by: Edward A. James <eajames@us.ibm.com>
* Merge pull request #13 from vishwabmc/masterPatrick Williams2016-05-263-0/+456
|\ | | | | Enabling updates to /etc/resolve.conf either manually or using DHCP supplied DNS IP
| * Enabling updates to /etc/resolve.conf either manually or using DHCP supplied DNSvishwa2016-05-243-0/+456
| | | | | | | | IP
* | Merge pull request #14 from hramasub/workitem148830Patrick Williams2016-05-241-0/+266
|\ \ | |/ |/| Log management service to stream journals/syslogs to a remote syslog …
| * Log management service to stream journals/syslogs to a remote syslog server.Hariharasubramanian R2016-04-011-0/+266
| |
* | Merge pull request #15 from hramasub/workitem151344Patrick Williams2016-04-291-0/+26
|\ \ | |/ |/| Added DBus method GetAddressType to identify if the interface is conf…
| * Added DBus method GetAddressType to identify if the interface is configuredHariharasubramanian R2016-04-291-0/+26
|/ | | | with static IP address or configured by DHCP.
* Merge pull request #12 from hramasub/workitem144137nkskjames2016-03-072-71/+141
|\ | | | | netman and userman throws exceptions and other bugfixes.
OpenPOWER on IntegriCloud