(1) In settling the accounts of a firm after dissolution, the goodwill shall, subject to contract between the partners, be included in the assets, and it may be sold either separately or along with other property of the firm.

(2) RIGHTS OF BUYER AND SELLER OF GOODWILL. Where the goodwill of a firm is sold after dissolution, a partner may carry on a business competing with that of the buyer and he may advertise such business, but, subject to agreement between him and the buyer, he may not

  (a) use the firm-name,

  (b) represent himself as carrying on the business of the firm, or

  (c) solicit the custom of persons who were dealing with the firm before its dissolution.

(3) AGREEMENTS IN RESTRAINT OF TRADE. Any partner may upon the sale of the goodwill of a firm, make an agreement with the buyer that such partner will not carry on any business similar to that of the firm within a specified period or within specified local limits, and, notwithstanding anything contained in section 27 of the Indian Contract Act, 1872 such agreement shall be valid if the restrictions are reasonable.